Spaces:
Runtime error
Runtime error
ivan
commited on
Commit
·
2fe8d18
1
Parent(s):
fcf063b
add files
Browse files- app.py +1 -1
- backend/query_llm.py +3 -2
app.py
CHANGED
@@ -124,4 +124,4 @@ with gr.Blocks() as demo:
|
|
124 |
gr.Examples(examples, txt)
|
125 |
|
126 |
demo.queue()
|
127 |
-
demo.launch(debug=True)
|
|
|
124 |
gr.Examples(examples, txt)
|
125 |
|
126 |
demo.queue()
|
127 |
+
demo.launch(debug=True, share=True)
|
backend/query_llm.py
CHANGED
@@ -7,13 +7,14 @@ from typing import Any, Dict, Generator, List
|
|
7 |
from huggingface_hub import InferenceClient
|
8 |
from transformers import AutoTokenizer
|
9 |
|
10 |
-
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1"
|
|
|
11 |
|
12 |
temperature = 0.9
|
13 |
top_p = 0.6
|
14 |
repetition_penalty = 1.2
|
15 |
|
16 |
-
OPENAI_KEY = getenv("OPENAI_API_KEY")
|
17 |
HF_TOKEN = getenv("HUGGING_FACE_HUB_TOKEN")
|
18 |
|
19 |
hf_client = InferenceClient(
|
|
|
7 |
from huggingface_hub import InferenceClient
|
8 |
from transformers import AutoTokenizer
|
9 |
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1",
|
11 |
+
force_download = True)
|
12 |
|
13 |
temperature = 0.9
|
14 |
top_p = 0.6
|
15 |
repetition_penalty = 1.2
|
16 |
|
17 |
+
OPENAI_KEY = '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' #getenv("OPENAI_API_KEY")
|
18 |
HF_TOKEN = getenv("HUGGING_FACE_HUB_TOKEN")
|
19 |
|
20 |
hf_client = InferenceClient(
|