jarguello76 commited on
Commit
df2b390
·
verified ·
1 Parent(s): 1747056

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,11 @@
 
1
  from huggingface_hub import InferenceApi
2
 
3
- inference_api = InferenceApi(repo_id="Qwen/Qwen1.5-1.8B-Chat", token="hf_your_token")
 
 
 
 
 
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?"))