Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -1,10 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
description = "
|
4 |
-
title = "
|
5 |
-
examples = [["
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
description=description,
|
9 |
examples=examples
|
10 |
)
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
description = "Question Rewriting with the PEGASUS model and using previous conversation turns"
|
4 |
+
title = "Conversational Question Rewriting"
|
5 |
+
examples = [["What was the first instrument Jimi Hendrix learned to play?"], ["In 1957, while helping his father with a side-job Jimi Hendrix found a ukulele amongst the garbage they were removing from an older woman's home."], ["Did Jimi Hendrix teach himself to play the ukulele?"], ["She told him that he could keep the ukulele, which had only one string. Learning by ear, Jimi Hendrix played single notes, following along to Elvis Presley songs."], ["What was the next instrument he learned to play?"]]
|
6 |
|
7 |
+
examples.reverse()
|
8 |
+
flat_input = [item for sublist in l for item in sublist]
|
9 |
+
|
10 |
+
examples = [' '.join(flat_list)]
|
11 |
+
|
12 |
+
|
13 |
+
interface = gr.Interface.load("huggingface/nichal/pegasus_QR",
|
14 |
description=description,
|
15 |
examples=examples
|
16 |
)
|