Maximofn commited on
Commit
f0a3a20
·
1 Parent(s): bd36812

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

Files changed (1) hide show
  1. app.py +3 -3
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
- # if __name__ == "__main__":
113
- # import uvicorn
114
- # uvicorn.run(app, host="0.0.0.0", port=7860)
 
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)