Spaces:
Runtime error
Runtime error
Create server.py
Browse files
server.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/")
|
| 6 |
+
def read_root():
|
| 7 |
+
return {"message": "FastAPI on Hugging Face Spaces"}
|
| 8 |
+
|
| 9 |
+
if __name__ == "__main__":
|
| 10 |
+
import uvicorn
|
| 11 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|