altawil commited on
Commit
04f7fb4
·
verified ·
1 Parent(s): 57b9764

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -400,7 +400,7 @@ app = FastAPI(
400
  )
401
 
402
  # متغيرات عامة سيتم تهيئتها عند بدء التشغيل
403
- MODEL: Interfuser = None
404
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
405
  SESSIONS: Dict[str, Dict] = {} # قاموس لتخزين حالة الجلسات النشطة
406
 
@@ -591,6 +591,6 @@ def end_session(session_id: str):
591
  return {"message": f"Session {session_id} ended."}
592
  raise HTTPException(status_code=404, detail="Session not found.")
593
  # ================== تشغيل الخادم ==================
594
- # if __name__ == "__main__":
595
- # import uvicorn
596
- # uvicorn.run(app, host="0.0.0.0", port=7860)
 
400
  )
401
 
402
  # متغيرات عامة سيتم تهيئتها عند بدء التشغيل
403
+ MODEL: InterfuserModel = None
404
  DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
405
  SESSIONS: Dict[str, Dict] = {} # قاموس لتخزين حالة الجلسات النشطة
406
 
 
591
  return {"message": f"Session {session_id} ended."}
592
  raise HTTPException(status_code=404, detail="Session not found.")
593
  # ================== تشغيل الخادم ==================
594
+ if __name__ == "__main__":
595
+ import uvicorn
596
+ uvicorn.run(app, host="0.0.0.0", port=7860)