GlobalBusinessAdvisors commited on
Commit
98e225c
1 Parent(s): 41275e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -1,4 +1,12 @@
1
- import uvicorn
 
2
 
3
- if __name__ == "__main__":
4
- uvicorn.run("app.main:app", host="0.0.0.0", port=8000, reload=True)
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from gradio_ui import create_ui
3
 
4
+ app = FastAPI()
5
+
6
+ @app.on_event("startup")
7
+ def startup_event():
8
+ create_ui()
9
+
10
+ @app.get("/")
11
+ def read_root():
12
+ return {"message": "EcoPropertyRetrofitGPT API is running"}