aixsatoshi commited on
Commit
0dfa748
1 Parent(s): f219e72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -17,8 +17,8 @@ hf_hub_download(
17
  )
18
 
19
  hf_hub_download(
20
- repo_id="bartowski/gemma-2-27b-it-GGUF",
21
- filename="gemma-2-27b-it-Q5_K_M.gguf",
22
  local_dir="./models"
23
  )
24
 
@@ -122,7 +122,7 @@ def create_interface(model_name, description):
122
  retry_btn="Retry",
123
  undo_btn="Undo",
124
  clear_btn="Clear",
125
- submit_btn="Send",
126
  title=f"Chat with Gemma 2 using llama.cpp - {model_name}",
127
  description=description,
128
  chatbot=gr.Chatbot(
@@ -143,10 +143,23 @@ interface_27b = create_interface('gemma-2-27b-it-Q5_K_M.gguf', description_27b)
143
  with gr.Blocks() as demo:
144
  #gr.Markdown("# Compare Gemma-2 9B and 27B Models")
145
  with gr.Row():
 
 
146
  with gr.Column():
147
  interface_9b.render()
148
  with gr.Column():
149
  interface_27b.render()
 
 
 
 
 
 
 
 
 
 
 
150
 
151
  if __name__ == "__main__":
152
  demo.launch()
 
17
  )
18
 
19
  hf_hub_download(
20
+ repo_id="bartowski/Gemma-2-9B-It-SPPO-Iter3-GGUF",
21
+ filename="Gemma-2-9B-It-SPPO-Iter3-Q5_K_M.gguf",
22
  local_dir="./models"
23
  )
24
 
 
122
  retry_btn="Retry",
123
  undo_btn="Undo",
124
  clear_btn="Clear",
125
+ submit_btn=None, # Remove the individual submit button
126
  title=f"Chat with Gemma 2 using llama.cpp - {model_name}",
127
  description=description,
128
  chatbot=gr.Chatbot(
 
143
  with gr.Blocks() as demo:
144
  #gr.Markdown("# Compare Gemma-2 9B and 27B Models")
145
  with gr.Row():
146
+ with gr.Column():
147
+ input_field = gr.Textbox(label="Input", interactive=True)
148
  with gr.Column():
149
  interface_9b.render()
150
  with gr.Column():
151
  interface_27b.render()
152
+
153
+ submit_btn = gr.Button("Send")
154
+
155
+ def send_to_both(input_text):
156
+ return input_text, input_text
157
+
158
+ submit_btn.click(
159
+ fn=send_to_both,
160
+ inputs=input_field,
161
+ outputs=[interface_9b.chatbot, interface_27b.chatbot]
162
+ )
163
 
164
  if __name__ == "__main__":
165
  demo.launch()