Shreeraj Mummidivarapu commited on
Update app.py
Browse files- server/app.py +9 -3
server/app.py
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
|
|
| 1 |
import sys
|
| 2 |
import os
|
| 3 |
|
| 4 |
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 5 |
|
| 6 |
-
from backend.main import app
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import uvicorn
|
| 2 |
import sys
|
| 3 |
import os
|
| 4 |
|
| 5 |
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| 6 |
|
| 7 |
+
from backend.main import app # app is now importable as server.app:app
|
| 8 |
|
| 9 |
+
|
| 10 |
+
def main():
|
| 11 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
main()
|