Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
190 |
-
|
191 |
-
[
|
192 |
-
[
|
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)
|