hsuwill000 commited on
Commit
f1706d4
·
verified ·
1 Parent(s): 08ac672

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -198,4 +198,13 @@ async def infer4_endpoint(request: InferenceRequestMinimal):
198
  except Exception as e:
199
  print(f"[Fatal Error] During API call: {e}")
200
  raise HTTPException(
201
- status_code=500,
 
 
 
 
 
 
 
 
 
 
198
  except Exception as e:
199
  print(f"[Fatal Error] During API call: {e}")
200
  raise HTTPException(
201
+ status_code=500,
202
+ detail="Internal Server Error."
203
+ )
204
+
205
+
206
+ # --- 8. 啟動應用程式 ---
207
+
208
+ if __name__ == "__main__":
209
+ print("FastAPI 服務正在啟動...")
210
+ uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=False)