Hammad712 commited on
Commit
895f8b8
·
verified ·
1 Parent(s): bfaa992

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -70,6 +70,6 @@ async def predict(file: UploadFile):
70
  except Exception as e:
71
  raise HTTPException(status_code=500, detail=f"Error during prediction: {str(e)}")
72
 
73
- # Run the application if the script is executed directly
74
- if __name__ == "__main__":
75
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
70
  except Exception as e:
71
  raise HTTPException(status_code=500, detail=f"Error during prediction: {str(e)}")
72
 
73
+ @app.get("/")
74
+ async def root():
75
+ return {"message": "API is up and running!"}