Spaces:
Runtime error
Runtime error
Royrotem100
commited on
Commit
โข
7b59ad4
1
Parent(s):
fbdfa10
Add DictaLM 2.0 instruct model
Browse files
app.py
CHANGED
@@ -82,13 +82,11 @@ def model_chat(query: Optional[str], history: Optional[History]) -> Generator[Tu
|
|
82 |
if response.status_code == 200:
|
83 |
prediction = response.json().get("prediction", "")
|
84 |
history.append((query, prediction))
|
85 |
-
yield prediction, history
|
86 |
else:
|
87 |
yield "Error: Unable to get a response from the model.", history
|
88 |
|
89 |
|
90 |
-
|
91 |
-
|
92 |
with gr.Blocks(css='''
|
93 |
.gr-group {direction: rtl;}
|
94 |
.chatbot{text-align:right;}
|
@@ -141,9 +139,9 @@ with gr.Blocks(css='''
|
|
141 |
<img src="file/logo_am.png" alt="Dicta Logo" class="dicta-logo">
|
142 |
</a>
|
143 |
<div class="dicta-intro-text">
|
144 |
-
<h1
|
145 |
<span dir='rtl'>ืืจืืืื ืืืืื ืืืื ืืืื ืืจืืงืืืื ืืจืืฉืื. ืืงืจื ืืช ืืืืืืช ืืืืื ืืจืื ืืืฆื ืืื ืืืื ืืกืืืข ืืื ืืืฉืืืืชืืื</span><br/>
|
146 |
-
<span dir='rtl'>ืืืื ื ืืชื ืขื ืืื
|
147 |
</div>
|
148 |
</div>
|
149 |
""")
|
|
|
82 |
if response.status_code == 200:
|
83 |
prediction = response.json().get("prediction", "")
|
84 |
history.append((query, prediction))
|
85 |
+
yield query, prediction, history # Return individual strings and history
|
86 |
else:
|
87 |
yield "Error: Unable to get a response from the model.", history
|
88 |
|
89 |
|
|
|
|
|
90 |
with gr.Blocks(css='''
|
91 |
.gr-group {direction: rtl;}
|
92 |
.chatbot{text-align:right;}
|
|
|
139 |
<img src="file/logo_am.png" alt="Dicta Logo" class="dicta-logo">
|
140 |
</a>
|
141 |
<div class="dicta-intro-text">
|
142 |
+
<h1>ืืืืื ืจืืฉืื ืืช</h1>
|
143 |
<span dir='rtl'>ืืจืืืื ืืืืื ืืืื ืืืื ืืจืืงืืืื ืืจืืฉืื. ืืงืจื ืืช ืืืืืืช ืืืืื ืืจืื ืืืฆื ืืื ืืืื ืืกืืืข ืืื ืืืฉืืืืชืืื</span><br/>
|
144 |
+
<span dir='rtl'>ืืืื ื ืืชื ืขื ืืื ืจืืขื ืจืชื ืชืื ืฉืืืืฉ ืืืืื ืฉืคื ืืืงืื ืฉืคืืชื ืขื ืืื ืืคื"ืช</span><br/>
|
145 |
</div>
|
146 |
</div>
|
147 |
""")
|