phamson02
commited on
Commit
•
59e5fd8
1
Parent(s):
a302d67
update
Browse files- app.py +2 -1
- complete_poem.py +2 -1
app.py
CHANGED
@@ -3,7 +3,8 @@ from complete_poem import complete_poem_interface
|
|
3 |
from generate_poem import generate_poem_interface
|
4 |
|
5 |
gr_interface = gr.TabbedInterface(
|
6 |
-
[complete_poem_interface, generate_poem_interface],
|
|
|
7 |
title="Thơ AI",
|
8 |
)
|
9 |
|
|
|
3 |
from generate_poem import generate_poem_interface
|
4 |
|
5 |
gr_interface = gr.TabbedInterface(
|
6 |
+
interface_list=[complete_poem_interface, generate_poem_interface],
|
7 |
+
tab_names=["Hoàn thiện bài thơ", "Sinh thơ thần kỳ"],
|
8 |
title="Thơ AI",
|
9 |
)
|
10 |
|
complete_poem.py
CHANGED
@@ -54,6 +54,7 @@ def complete_poem(text, style):
|
|
54 |
|
55 |
|
56 |
complete_poem_interface = gr.Interface(
|
|
|
57 |
fn=complete_poem,
|
58 |
inputs=[
|
59 |
gr.components.Textbox(
|
@@ -64,7 +65,7 @@ complete_poem_interface = gr.Interface(
|
|
64 |
gr.components.Dropdown(
|
65 |
choices=["Lục Bát", "Bảy Chữ", "Tám Chữ", "Năm Chữ"],
|
66 |
label="Kiểu thơ",
|
67 |
-
|
68 |
),
|
69 |
],
|
70 |
outputs="text",
|
|
|
54 |
|
55 |
|
56 |
complete_poem_interface = gr.Interface(
|
57 |
+
title="Viết tiếp áng thơ hay...",
|
58 |
fn=complete_poem,
|
59 |
inputs=[
|
60 |
gr.components.Textbox(
|
|
|
65 |
gr.components.Dropdown(
|
66 |
choices=["Lục Bát", "Bảy Chữ", "Tám Chữ", "Năm Chữ"],
|
67 |
label="Kiểu thơ",
|
68 |
+
value="Lục Bát",
|
69 |
),
|
70 |
],
|
71 |
outputs="text",
|