Spaces:
Build error
Build error
Uncomment and activate Uvicorn server configuration
Browse files- Restore main block for running FastAPI application
- Enable direct server startup with Uvicorn
- Set host to 0.0.0.0 and port to 7860
- Simplify application runtime initialization
app.py
CHANGED
|
@@ -109,6 +109,6 @@ async def generate(request: QueryRequest):
|
|
| 109 |
except Exception as e:
|
| 110 |
raise HTTPException(status_code=500, detail=f"Error al generar texto: {str(e)}")
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
| 109 |
except Exception as e:
|
| 110 |
raise HTTPException(status_code=500, detail=f"Error al generar texto: {str(e)}")
|
| 111 |
|
| 112 |
+
if __name__ == "__main__":
|
| 113 |
+
import uvicorn
|
| 114 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|