Spaces:
Runtime error
Runtime error
| """Hugging Face Spaces entrypoint.""" | |
| import gradio as gr | |
| import traceback | |
| try: | |
| from api.main import app as fastapi_app | |
| ui = gr.Interface(lambda text: text, "text", "text", title="Arabic Sentiment Analysis") | |
| app = gr.mount_gradio_app(fastapi_app, ui, path="/") | |
| demo = ui | |
| except Exception as e: | |
| print("!!! CRITICAL ERROR") | |
| traceback.print_exc() | |
| # Create a dummy UI so the container stays alive and lets you read logs | |
| demo = gr.Interface(lambda: str(e), None, "text", title="Error State") | |