Spaces:
Running
Running
File size: 658 Bytes
3e39495 44ee8e7 d213aa7 44ee8e7 3e39495 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import os
import gradio as gr
from app import create_app
# Set environment variables for Hugging Face Space
os.environ["GEMINI_API_KEY"] = os.getenv("GEMINI_API_KEY", "")
def main():
"""Entry point for Hugging Face Spaces"""
try:
# Create the app
app = create_app()
# Launch for Hugging Face Space
app.launch(
share=False, # HF Spaces don't need share=True
server_name="0.0.0.0",
server_port=7860,
show_error=True
)
except Exception as e:
print(f"❌ Application startup error: {e}")
raise
if __name__ == "__main__":
main()
|