Advocate_Life_Style / huggingface_space.py
DocUA's picture
Convert all prompts and code to English
d213aa7
raw
history blame contribute delete
658 Bytes
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()