DocUA's picture
Translate entire app interface to English
f55199b
raw
history blame
751 Bytes
import os
from dotenv import load_dotenv
from gradio_interface import create_gradio_interface
load_dotenv()
def create_app():
"""Creates Gradio app for Hugging Face Space"""
return create_gradio_interface()
if __name__ == "__main__":
if not os.getenv("GEMINI_API_KEY"):
print("⚠️ GEMINI_API_KEY not found in environment variables!")
print("For local run, create .env file with API key")
demo = create_gradio_interface()
is_hf_space = os.getenv("SPACE_ID") is not None
if is_hf_space:
demo.launch(
server_name="0.0.0.0",
server_port=7860,
show_api=False,
show_error=True
)
else:
demo.launch(share=True, debug=True)