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
  """)