PR: Fix grader inference routing by using Inference Providers (minimal code change)

#23
by John6666 - opened
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ import black
9
  # Initialize the inference client
10
  HF_TOKEN = os.getenv("HF_TOKEN")
11
  HF_API_URL = os.getenv("HF_API_URL", "Qwen/Qwen2.5-Coder-32B-Instruct")
12
- client = InferenceClient(model=HF_API_URL, token=HF_TOKEN)
13
 
14
  # Load questions from Hugging Face dataset
15
  EXAM_MAX_QUESTIONS = int(os.getenv("EXAM_MAX_QUESTIONS", 1))
 
9
  # Initialize the inference client
10
  HF_TOKEN = os.getenv("HF_TOKEN")
11
  HF_API_URL = os.getenv("HF_API_URL", "Qwen/Qwen2.5-Coder-32B-Instruct")
12
+ client = InferenceClient(model=HF_API_URL, provider="auto", token=HF_TOKEN)
13
 
14
  # Load questions from Hugging Face dataset
15
  EXAM_MAX_QUESTIONS = int(os.getenv("EXAM_MAX_QUESTIONS", 1))
requirements.txt CHANGED
@@ -34,7 +34,7 @@ gradio-client==1.7.0
34
  h11==0.14.0
35
  httpcore==1.0.7
36
  httpx==0.28.1
37
- huggingface-hub==0.28.1
38
  idna==3.10
39
  ipykernel==6.29.5
40
  ipython==8.32.0
 
34
  h11==0.14.0
35
  httpcore==1.0.7
36
  httpx==0.28.1
37
+ huggingface-hub==1.4.1
38
  idna==3.10
39
  ipykernel==6.29.5
40
  ipython==8.32.0