LeVinh commited on
Commit
e284096
·
1 Parent(s): 1a45b53

fix space id

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. eval.py +1 -5
Dockerfile CHANGED
@@ -14,6 +14,9 @@ RUN apt-get update && apt-get install -y \
14
  curl \
15
  && rm -rf /var/lib/apt/lists/*
16
 
 
 
 
17
  # Copy requirements and install
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir --upgrade pip && \
 
14
  curl \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Set SPACE_ID to bypass Gradio OAuth warnings
18
+ ENV SPACE_ID=vinhle/First_agent_template
19
+
20
  # Copy requirements and install
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir --upgrade pip && \
eval.py CHANGED
@@ -67,11 +67,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
67
  and displays the results.
68
  """
69
  # --- Determine HF Space Runtime URL and Repo URL ---
70
- # Fallback to hardcoded ID if env var is missing (e.g. in Docker)
71
- space_id = os.getenv("SPACE_ID", "vinhle/First_agent_template")
72
-
73
- # CRITICAL FIX: Force set the environment variable so Gradio sees it
74
- os.environ["SPACE_ID"] = space_id
75
 
76
  if profile:
77
  username= f"{profile.username}"
 
67
  and displays the results.
68
  """
69
  # --- Determine HF Space Runtime URL and Repo URL ---
70
+ space_id = os.getenv("SPACE_ID")
 
 
 
 
71
 
72
  if profile:
73
  username= f"{profile.username}"