Spaces:
BG5
/
Running

BG5 commited on
Commit
a32f715
·
verified ·
1 Parent(s): c385c1b

Update fun.py

Browse files
Files changed (1) hide show
  1. fun.py +2 -1
fun.py CHANGED
@@ -1,5 +1,6 @@
1
  from fastapi import FastAPI, Request, Response, status
2
  import httpx
 
3
 
4
  app = FastAPI()
5
  TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
@@ -28,4 +29,4 @@ async def proxy(request: Request, path: str):
28
 
29
  if __name__ == "__main__":
30
  # 运行FastAPI应用
31
- uvicorn.run("http:app", host="0.0.0.0", port=8000, reload=True)
 
1
  from fastapi import FastAPI, Request, Response, status
2
  import httpx
3
+ import uvicorn
4
 
5
  app = FastAPI()
6
  TARGET_BASE = "http://127.0.0.1:8001" # 替换为你的目标服务器
 
29
 
30
  if __name__ == "__main__":
31
  # 运行FastAPI应用
32
+ uvicorn.run("fun:app", host="0.0.0.0", port=8000, reload=True)