Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -66,10 +66,10 @@ system_propmpt = system_sr
|
|
66 |
Settings.llm = HuggingFaceInferenceAPI(model_name="mistralai/Mistral-Nemo-Instruct-2407",
|
67 |
device_map="auto",
|
68 |
system_prompt = system_propmpt,
|
69 |
-
context_window=
|
70 |
-
max_new_tokens=
|
71 |
# stopping_ids=[50278, 50279, 50277, 1, 0],
|
72 |
-
generate_kwargs={"temperature": 0.
|
73 |
# tokenizer_kwargs={"max_length": 4096},
|
74 |
tokenizer_name="mistralai/Mistral-Nemo-Instruct-2407",
|
75 |
)
|
@@ -160,9 +160,9 @@ def rag(input_text, history, jezik, file):
|
|
160 |
# outputs=[gr.Textbox(label="Odgovor:", lines=6)],
|
161 |
# ChatMessage(role="assistant", content="Kako Vam mogu pomoći?")
|
162 |
iface = gr.ChatInterface(rag,
|
163 |
-
title="
|
164 |
description="Postavite pitanje ili opišite problem koji imate",
|
165 |
-
chatbot=gr.Chatbot(placeholder="Kako Vam mogu pomoći?", type="tuples", label="
|
166 |
textbox=gr.Textbox(placeholder="Pitanje ili opis problema", container=False, scale=7),
|
167 |
theme="soft",
|
168 |
# examples=["Ne radi mi internet", "Koje usluge imam na raspologanju?", "Ne radi mi daljinski upravljač, šta da radim?"],
|
|
|
66 |
Settings.llm = HuggingFaceInferenceAPI(model_name="mistralai/Mistral-Nemo-Instruct-2407",
|
67 |
device_map="auto",
|
68 |
system_prompt = system_propmpt,
|
69 |
+
context_window=5000,
|
70 |
+
max_new_tokens=2048,
|
71 |
# stopping_ids=[50278, 50279, 50277, 1, 0],
|
72 |
+
generate_kwargs={"temperature": 0.5, "top_p":0.92, "do_sample": False},
|
73 |
# tokenizer_kwargs={"max_length": 4096},
|
74 |
tokenizer_name="mistralai/Mistral-Nemo-Instruct-2407",
|
75 |
)
|
|
|
160 |
# outputs=[gr.Textbox(label="Odgovor:", lines=6)],
|
161 |
# ChatMessage(role="assistant", content="Kako Vam mogu pomoći?")
|
162 |
iface = gr.ChatInterface(rag,
|
163 |
+
title="UChat",
|
164 |
description="Postavite pitanje ili opišite problem koji imate",
|
165 |
+
chatbot=gr.Chatbot(placeholder="Kako Vam mogu pomoći?", type="tuples", label="Agent podrške", height=300),
|
166 |
textbox=gr.Textbox(placeholder="Pitanje ili opis problema", container=False, scale=7),
|
167 |
theme="soft",
|
168 |
# examples=["Ne radi mi internet", "Koje usluge imam na raspologanju?", "Ne radi mi daljinski upravljač, šta da radim?"],
|