alanchen1115 commited on
Commit
075e34b
·
verified ·
1 Parent(s): 5f95760

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -1,5 +1,5 @@
1
  from fastapi.middleware.cors import CORSMiddleware
2
- from fastapi import FastAPI, Request, Header, BackgroundTasks, HTTPException, status
3
  from gradio_client import Client
4
  import json
5
  import os
@@ -24,7 +24,7 @@ working_status = os.getenv("DEFALUT_TALKING", default = "true").lower() == "true
24
 
25
  # 建立 FastAPI 應用程式
26
  app = FastAPI()
27
- app.mount("/static", StaticFiles(directory="static"), name="static")
28
 
29
  # 設定 CORS,允許跨域請求
30
  app.add_middleware(
 
1
  from fastapi.middleware.cors import CORSMiddleware
2
+ from fastapi import FastAPI, Request, Header, BackgroundTasks, HTTPException, status, staticfiles
3
  from gradio_client import Client
4
  import json
5
  import os
 
24
 
25
  # 建立 FastAPI 應用程式
26
  app = FastAPI()
27
+ app.mount("/static", staticfiles.StaticFiles(directory="static"), name="static")
28
 
29
  # 設定 CORS,允許跨域請求
30
  app.add_middleware(