Spaces:
Runtime error
Runtime error
Update app.py
Browse files82 unmodified lines8384858687888982 unmodified lines@app.get("/")def read_root():return {"message": "This is My Nutrionguid App FAST"}@app.post("/predictNUT")async def predict_image_and_nutrition(file: UploadFile = File(...)):82 unmodified lines838485868788899091929394959697989910010110210310410582 unmodified lines@app.get("/")def read_root():keep_alive()return {"message": "This is My Nutrionguid App FAST"}def keep_alive(space_url="https://1mr-apigmail.hf.space/ping", interval_hours=5):while True:try:print(f"🔄 Pinging {space_url} at {datetime.now()}")response = requests.get(space_url)if response.status_code == 200:print("")else:print("")except Exception as e:print("")time.sleep(interval_hours * 3600)@app.post("/predictNUT")async def predict_image_and_nutrition(file: UploadFile = File(...)):
app.py+16