Spaces:
Running
Running
hf
Browse files
app.py
CHANGED
@@ -7,7 +7,15 @@ import os
|
|
7 |
|
8 |
login(token=os.environ["HUGGINGFACEHUB_API_TOKEN"])
|
9 |
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
def predict(message, history):
|
13 |
history_langchain_format = []
|
|
|
7 |
|
8 |
login(token=os.environ["HUGGINGFACEHUB_API_TOKEN"])
|
9 |
|
10 |
+
llm = HuggingFaceEndpoint(
|
11 |
+
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
12 |
+
task="text-generation",
|
13 |
+
max_new_tokens=512,
|
14 |
+
do_sample=False,
|
15 |
+
repetition_penalty=1.03,
|
16 |
+
)
|
17 |
+
|
18 |
+
model = ChatHuggingFace(llm=llm)
|
19 |
|
20 |
def predict(message, history):
|
21 |
history_langchain_format = []
|