Daemontatox
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -171,11 +171,12 @@ llm = ChatOpenAI(
|
|
171 |
max_retries=2,
|
172 |
api_key=OPENAPI_KEY, # if you prefer to pass api key in directly instaed of using env vars
|
173 |
base_url="https://openrouter.ai/api/v1",
|
|
|
174 |
|
175 |
)
|
176 |
|
177 |
template = """
|
178 |
-
|
179 |
|
180 |
---
|
181 |
|
@@ -252,6 +253,7 @@ By adhering to these principles and guidelines, ensure every response is accurat
|
|
252 |
Previous Conversation: {chat_history}
|
253 |
Retrieved Context: {context}
|
254 |
Current Question: {question}
|
|
|
255 |
|
256 |
"""
|
257 |
|
@@ -341,7 +343,7 @@ def clear_chat():
|
|
341 |
|
342 |
# Gradio Interface
|
343 |
with gr.Blocks() as iface:
|
344 |
-
gr.Image("Image.jpg", width=
|
345 |
gr.Markdown("# Mawared HR Assistant 4.0.2")
|
346 |
gr.Markdown('### Patch notes')
|
347 |
gr.Markdown("""
|
@@ -349,7 +351,16 @@ with gr.Blocks() as iface:
|
|
349 |
|
350 |
2-New Knowledge base
|
351 |
|
352 |
-
3-New base Model , DeepSeek R1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
""")
|
354 |
|
355 |
chatbot = gr.Chatbot(
|
|
|
171 |
max_retries=2,
|
172 |
api_key=OPENAPI_KEY, # if you prefer to pass api key in directly instaed of using env vars
|
173 |
base_url="https://openrouter.ai/api/v1",
|
174 |
+
stream=True,
|
175 |
|
176 |
)
|
177 |
|
178 |
template = """
|
179 |
+
Your Name is Maxwel , a specialized AI assistant for the Mawared HR System, designed to deliver accurate and contextually relevant support based solely on the provided context and chat history.
|
180 |
|
181 |
---
|
182 |
|
|
|
253 |
Previous Conversation: {chat_history}
|
254 |
Retrieved Context: {context}
|
255 |
Current Question: {question}
|
256 |
+
Answer : {{answer}}
|
257 |
|
258 |
"""
|
259 |
|
|
|
343 |
|
344 |
# Gradio Interface
|
345 |
with gr.Blocks() as iface:
|
346 |
+
gr.Image("Image.jpg", width=800, height=200, show_label=False, show_download_button=False)
|
347 |
gr.Markdown("# Mawared HR Assistant 4.0.2")
|
348 |
gr.Markdown('### Patch notes')
|
349 |
gr.Markdown("""
|
|
|
351 |
|
352 |
2-New Knowledge base
|
353 |
|
354 |
+
3-New base Model , DeepSeek R1 , Finetuned for Customer Support
|
355 |
+
|
356 |
+
|
357 |
+
## Known Issues:
|
358 |
+
● Assistant Fails in questions ranked Tier 3 on the complexity Scale.
|
359 |
+
|
360 |
+
|
361 |
+
● Assistant might be lazy sometimes and instead of helping the customer, will just forward them to a human representative.
|
362 |
+
|
363 |
+
● Assistant might overthink some questions and loop into an endless anxiety loop of overthinking, please report to me if that happens.
|
364 |
""")
|
365 |
|
366 |
chatbot = gr.Chatbot(
|