Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|