djstrong commited on
Commit
3dfcfa7
1 Parent(s): 1acc3f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -5,6 +5,7 @@ from threading import Thread
5
 
6
  import requests
7
 
 
8
  import torch
9
  import spaces
10
  import gradio as gr
@@ -186,12 +187,13 @@ def vote(chatbot, data: gr.LikeData):
186
 
187
  # Create Gradio interface
188
  def update_examples():
189
- return gr.Dataset(samples=random.choice(
190
- [
191
- [["merhaba"], ["merhaba2"]],
192
- [["bonjour"], ["bonjour2"]]
193
  ]
194
- ))
 
195
 
196
  with gr.Blocks(js=on_load) as demo:
197
  chatbot = gr.Chatbot(label="Chatbot", likeable=True, render=False)
 
5
 
6
  import requests
7
 
8
+ import random
9
  import torch
10
  import spaces
11
  import gradio as gr
 
187
 
188
  # Create Gradio interface
189
  def update_examples():
190
+ exs = [
191
+ ["Kim jesteś?"],
192
+ ["Ile to jest 9+2-1?"],
193
+ ["Napisz mi coś miłego."]
194
  ]
195
+ random.shuffle(exs)
196
+ return gr.Dataset(samples=exs)
197
 
198
  with gr.Blocks(js=on_load) as demo:
199
  chatbot = gr.Chatbot(label="Chatbot", likeable=True, render=False)