Sumanthm20 commited on
Commit
e66e7fd
·
verified ·
1 Parent(s): 2827ca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -8,8 +8,17 @@ from huggingface_hub import whoami, InferenceClient
8
  import black # Add black import
9
 
10
  # Initialize the inference client
11
- client = InferenceClient(
12
- api_key=os.getenv("HF_TOKEN"), # Make sure to set this environment variable
 
 
 
 
 
 
 
 
 
13
  )
14
 
15
  # Load questions from Hugging Face dataset
 
8
  import black # Add black import
9
 
10
  # Initialize the inference client
11
+ from openai import OpenAI
12
+
13
+ client = OpenAI(
14
+ base_url="https://router.huggingface.co/hf-inference/v1", # Update this line
15
+ api_key="YOUR_HF_TOKEN"
16
+ )
17
+
18
+ # Use the latest model version
19
+ response = client.chat.completions.create(
20
+ model="Qwen/Qwen3.5-Coder-32B-Instruct",
21
+ messages=[{"role": "user", "content": "Explain your fine-tuning process."}]
22
  )
23
 
24
  # Load questions from Hugging Face dataset