Spaces:
Paused
Paused
Update testapi.py
Browse files- testapi.py +5 -1
testapi.py
CHANGED
|
@@ -44,4 +44,8 @@ def predict(data: inputdata):
|
|
| 44 |
if hasattr(prediction, 'tolist'):
|
| 45 |
prediction = prediction.tolist()
|
| 46 |
|
| 47 |
-
return {"message": prediction}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
if hasattr(prediction, 'tolist'):
|
| 45 |
prediction = prediction.tolist()
|
| 46 |
|
| 47 |
+
return {"message": prediction}
|
| 48 |
+
# At the bottom of your file, add:
|
| 49 |
+
if __name__ == "__main__":
|
| 50 |
+
import uvicorn
|
| 51 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|