Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,11 @@
|
|
|
|
1 |
from huggingface_hub import InferenceApi
|
2 |
|
3 |
-
inference_api = InferenceApi(
|
|
|
|
|
|
|
|
|
|
|
4 |
llm = HuggingFaceInferenceWrapper(inference_api)
|
5 |
print(llm.generate("What is the capital of France?"))
|
|
|
1 |
+
import os
|
2 |
from huggingface_hub import InferenceApi
|
3 |
|
4 |
+
inference_api = InferenceApi(
|
5 |
+
repo_id="Qwen/Qwen1.5-1.8B-Chat",
|
6 |
+
token=os.environ["HUGGINGFACE_API_KEY"]
|
7 |
+
)
|
8 |
+
|
9 |
+
|
10 |
llm = HuggingFaceInferenceWrapper(inference_api)
|
11 |
print(llm.generate("What is the capital of France?"))
|