Update app.py
Browse files
app.py
CHANGED
@@ -35,4 +35,11 @@ async def sleep():
|
|
35 |
print(f"[SYSTEM] Error: {str(e)}")
|
36 |
return {"error": str(e)}
|
37 |
|
38 |
-
# Remove the main function as Hugging Face Spaces will automatically run the app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
print(f"[SYSTEM] Error: {str(e)}")
|
36 |
return {"error": str(e)}
|
37 |
|
38 |
+
# Remove the main function as Hugging Face Spaces will automatically run the app. Using here to test
|
39 |
+
|
40 |
+
if __name__ == "__main__":
|
41 |
+
import uvicorn
|
42 |
+
import asyncio
|
43 |
+
|
44 |
+
loop = asyncio.get_event_loop()
|
45 |
+
loop.run_until_complete(uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 8000))))
|