Spaces:
Runtime error
Runtime error
add questions
Browse files
app.py
CHANGED
@@ -7,21 +7,47 @@ with demo:
|
|
7 |
"""
|
8 |
# 🚀💬 Improving Text Generation 💬🚀
|
9 |
|
10 |
-
This is a ever-evolving
|
|
|
|
|
|
|
11 |
1. Answer the questions using the dropdown menus
|
12 |
2. Click on "Get Suggestions" buttion
|
13 |
3. Explore the suggestions 🤗
|
14 |
"""
|
15 |
)
|
16 |
|
17 |
-
with gr.
|
18 |
-
with gr.
|
19 |
task_type = gr.Dropdown(
|
20 |
label="Task Type",
|
21 |
-
choices=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
)
|
23 |
-
|
24 |
-
|
25 |
|
26 |
if __name__ == "__main__":
|
27 |
demo.launch()
|
|
|
7 |
"""
|
8 |
# 🚀💬 Improving Text Generation 💬🚀
|
9 |
|
10 |
+
This is a ever-evolving guide on how to improve your text generation results. It is community-led and
|
11 |
+
curated by Hugging Face 🤗
|
12 |
+
|
13 |
+
How to use it:
|
14 |
1. Answer the questions using the dropdown menus
|
15 |
2. Click on "Get Suggestions" buttion
|
16 |
3. Explore the suggestions 🤗
|
17 |
"""
|
18 |
)
|
19 |
|
20 |
+
with gr.Row():
|
21 |
+
with gr.Column(width=200):
|
22 |
task_type = gr.Dropdown(
|
23 |
label="Task Type",
|
24 |
+
choices=[
|
25 |
+
"✍️ Text Generation",
|
26 |
+
"🤏 Summarization",
|
27 |
+
"🫂 Translation",
|
28 |
+
"💬 Conversational / Chatbot",
|
29 |
+
"🕵️ (Table/Document/Visual/Text) Question Answering",
|
30 |
+
"🎤 Automatic Speech Recognition",
|
31 |
+
"🌇 Image to Text",
|
32 |
+
],
|
33 |
+
value="Text Generation",
|
34 |
+
)
|
35 |
+
model_name = gr.Textbox(
|
36 |
+
label="Which model are you using?",
|
37 |
+
placeholder="google/flan-t5-xl",
|
38 |
+
)
|
39 |
+
problem_type = gr.Dropdown(
|
40 |
+
label="What is your current problem?",
|
41 |
+
choices=[
|
42 |
+
"I would like a ChatGPT-like model",
|
43 |
+
"The output is too repetitive",
|
44 |
+
"The output is too short or too long",
|
45 |
+
"Other"
|
46 |
+
],
|
47 |
+
value="Text Generation",
|
48 |
)
|
49 |
+
with gr.Column():
|
50 |
+
box = gr.Textbox()
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
demo.launch()
|