Spaces:
Runtime error
Runtime error
Update app2.py
Browse files
app2.py
CHANGED
@@ -22,7 +22,7 @@ pipe_tapas = pipeline(
|
|
22 |
)
|
23 |
|
24 |
|
25 |
-
def process(query,
|
26 |
# table = pd.read_csv(file.name, header=0).astype(str)
|
27 |
# table = table[:rows]
|
28 |
data = {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}
|
@@ -60,14 +60,10 @@ iface = gr.Interface(
|
|
60 |
inputs=[query_text, input_data, rows_slider],
|
61 |
outputs=[answer_text_tapex, answer_text_tapas],
|
62 |
examples=[
|
63 |
-
["
|
64 |
-
[
|
65 |
-
|
66 |
-
|
67 |
-
20,
|
68 |
-
],
|
69 |
-
["Which teams have scored less than 40 goals?", "default_file.csv", 20],
|
70 |
-
["What is the average number of wins?", "default_file.csv", 20],
|
71 |
],
|
72 |
allow_flagging="never",
|
73 |
)
|
|
|
22 |
)
|
23 |
|
24 |
|
25 |
+
def process(query, data, correct_answer, rows=20):
|
26 |
# table = pd.read_csv(file.name, header=0).astype(str)
|
27 |
# table = table[:rows]
|
28 |
data = {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}
|
|
|
60 |
inputs=[query_text, input_data, rows_slider],
|
61 |
outputs=[answer_text_tapex, answer_text_tapas],
|
62 |
examples=[
|
63 |
+
["how many movies does Leonardo Di Caprio have?", {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}, 20],
|
64 |
+
["how many movies does Leonardo Di Caprio have?", "{"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}", 20],
|
65 |
+
["how many movies does Leonardo Di Caprio have?", "{"Rank": ["1", "2", "3"], "Number of movies": ["87", "53", "69"]}", 20],
|
66 |
+
|
|
|
|
|
|
|
|
|
67 |
],
|
68 |
allow_flagging="never",
|
69 |
)
|