itsbava commited on
Commit
0fce058
·
verified ·
1 Parent(s): a5a8b9d

Upload 4 files

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. handler.py +10 -0
app.py CHANGED
@@ -219,4 +219,4 @@ async def search_faiss(request: dict):
219
 
220
  if __name__ == "__main__":
221
  import uvicorn
222
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
219
 
220
  if __name__ == "__main__":
221
  import uvicorn
222
+ uvicorn.run(app, host="0.0.0.0", port=8060)
handler.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from app import app
2
+
3
+ # This is the handler that HuggingFace expects
4
+ def handler(event, context):
5
+ return app
6
+
7
+ # For direct FastAPI deployment
8
+ if __name__ == "__main__":
9
+ import uvicorn
10
+ uvicorn.run(app, host="0.0.0.0", port=8060)