Oscarli commited on
Commit
d170307
·
verified ·
1 Parent(s): e0057c1

Upload 10 files

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -2
  2. app.py +4 -5
Dockerfile CHANGED
@@ -11,8 +11,7 @@ COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Copy the rest of the application files into the container
14
- COPY app.py .
15
- COPY static ./static
16
 
17
  # Make port 7860 available (standard for HF Spaces)
18
  EXPOSE 7860
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  # Copy the rest of the application files into the container
14
+ COPY . .
 
15
 
16
  # Make port 7860 available (standard for HF Spaces)
17
  EXPOSE 7860
app.py CHANGED
@@ -75,12 +75,11 @@ async def proxy_deepseek(request: Request):
75
  detail=f"Internal server error: {str(e)}"
76
  )
77
 
 
78
  # --- Static File Serving ---
79
- # Check if the static directory exists before mounting to prevent startup errors.
80
- if os.path.isdir(STATIC_DIR):
81
- app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
82
- else:
83
- print(f"Warning: Static directory '{STATIC_DIR}' not found. Static files will not be served via /static mount.")
84
 
85
  @app.get("/")
86
  async def read_root():
 
75
  detail=f"Internal server error: {str(e)}"
76
  )
77
 
78
+
79
  # --- Static File Serving ---
80
+ # Mount the 'static' directory to serve index.html and other assets
81
+ # Use the absolute path to be safe
82
+ app.mount("/static", StaticFiles(directory=STATIC_DIR), name="static")
 
 
83
 
84
  @app.get("/")
85
  async def read_root():