Romi Nur Ismanto Claude Opus 4.6 (1M context) commited on
Commit ·
c833fda
1
Parent(s): 67046fd
Fix runtime error: revert to simple InferenceClient constructor
Browse files- Remove provider="auto" which may not be supported in Space env
- Use simple InferenceClient(token=...) constructor
- Add requirements.txt to ensure recent huggingface_hub version
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- app.py +1 -4
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -18,10 +18,7 @@ def respond(
|
|
| 18 |
yield "⚠️ Silakan login dulu dengan tombol Login di sidebar."
|
| 19 |
return
|
| 20 |
|
| 21 |
-
client = InferenceClient(
|
| 22 |
-
provider="auto",
|
| 23 |
-
api_key=hf_token.token,
|
| 24 |
-
)
|
| 25 |
|
| 26 |
messages = [{"role": "system", "content": system_message}]
|
| 27 |
messages.extend(history)
|
|
|
|
| 18 |
yield "⚠️ Silakan login dulu dengan tombol Login di sidebar."
|
| 19 |
return
|
| 20 |
|
| 21 |
+
client = InferenceClient(token=hf_token.token)
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
messages = [{"role": "system", "content": system_message}]
|
| 24 |
messages.extend(history)
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
huggingface_hub>=0.27.0
|