Royrotem100 commited on
Commit
7b59ad4
โ€ข
1 Parent(s): fbdfa10

Add DictaLM 2.0 instruct model

Browse files
Files changed (1) hide show
  1. app.py +3 -5
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>ืฆ'ืื˜ ืžืขืจื›ื™ - ื”ื“ื’ืžื” ืจืืฉื•ื ื™ืช</h1>
145
  <span dir='rtl'>ื‘ืจื•ื›ื™ื ื”ื‘ืื™ื ืœื“ืžื• ื”ืื™ื ื˜ืจืืงื˜ื™ื‘ื™ ื”ืจืืฉื•ืŸ. ื—ืงืจื• ืืช ื™ื›ื•ืœื•ืช ื”ืžื•ื“ืœ ื•ืจืื• ื›ื™ืฆื“ ื”ื•ื ื™ื›ื•ืœ ืœืกื™ื™ืข ืœื›ื ื‘ืžืฉื™ืžื•ืชื™ื›ื</span><br/>
146
- <span dir='rtl'>ื”ื“ืžื• ื ื›ืชื‘ ืขืœ ื™ื“ื™ ืกืจืŸ ืจื•ืขื™ ืจืชื ืชื•ืš ืฉื™ืžื•ืฉ ื‘ืžื•ื“ืœ ืฉืคื” ื“ื™ืงื˜ื” ืฉืคื•ืชื— ืขืœ ื™ื“ื™ ืžืคื"ืช</span><br/>
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
  """)