Royrotem100 commited on
Commit
50b8788
1 Parent(s): e13545d

Add DictaLM 2.0 instruct model 10

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -98,6 +98,7 @@ def model_chat(query: Optional[str], history: Optional[History]) -> Tuple[Histor
98
  return history, "Error: Unable to get a response from the model."
99
 
100
 
 
101
  with gr.Blocks(css='''
102
  .gr-group {direction: rtl;}
103
  .chatbot{text-align:right;}
@@ -160,10 +161,10 @@ with gr.Blocks(css='''
160
  chatbot = gr.Chatbot()
161
  query = gr.Textbox(placeholder="讛讻谞住 砖讗诇讛 讘注讘专讬转 (讗讜 讘讗谞讙诇讬转!)", rtl=True)
162
  clear_btn = gr.Button("谞拽讛 砖讬讞讛")
163
-
164
- def respond(query: str, history: History) -> Tuple[History, str]:
165
  history, response = model_chat(query, history)
166
- return history, "" # Only return history and clear the input box
167
 
168
  demo_state = gr.State([])
169
 
 
98
  return history, "Error: Unable to get a response from the model."
99
 
100
 
101
+
102
  with gr.Blocks(css='''
103
  .gr-group {direction: rtl;}
104
  .chatbot{text-align:right;}
 
161
  chatbot = gr.Chatbot()
162
  query = gr.Textbox(placeholder="讛讻谞住 砖讗诇讛 讘注讘专讬转 (讗讜 讘讗谞讙诇讬转!)", rtl=True)
163
  clear_btn = gr.Button("谞拽讛 砖讬讞讛")
164
+
165
+ def respond(query: str, history: History) -> Tuple[History, str, History]:
166
  history, response = model_chat(query, history)
167
+ return history, response, history # Return history, response, and state
168
 
169
  demo_state = gr.State([])
170