Update app.py
Browse files
app.py
CHANGED
@@ -4,16 +4,16 @@ import gradio as gr
|
|
4 |
api = gr.Interface.load("models/bigscience/bloom")
|
5 |
|
6 |
def change_textbox(choice, textin):
|
7 |
-
if choice == "
|
8 |
return textin[:-50] + api(textin[-50:])
|
9 |
-
elif choice == "
|
10 |
return textin[:-50] + api(textin[-50:])
|
11 |
else:
|
12 |
return textin[:-50] + api(textin[-50:])
|
13 |
|
14 |
with gr.Blocks() as block:
|
15 |
radio = gr.Radio(
|
16 |
-
["
|
17 |
)
|
18 |
textin = gr.Textbox(lines=2, interactive=True)
|
19 |
textin.update(lines=8, visible=True)
|
|
|
4 |
api = gr.Interface.load("models/bigscience/bloom")
|
5 |
|
6 |
def change_textbox(choice, textin):
|
7 |
+
if choice == "Expository":
|
8 |
return textin[:-50] + api(textin[-50:])
|
9 |
+
elif choice == "Narrative":
|
10 |
return textin[:-50] + api(textin[-50:])
|
11 |
else:
|
12 |
return textin[:-50] + api(textin[-50:])
|
13 |
|
14 |
with gr.Blocks() as block:
|
15 |
radio = gr.Radio(
|
16 |
+
["Expository", "Narrative", "Opinion"], label="What kind of essay would you like to write?"
|
17 |
)
|
18 |
textin = gr.Textbox(lines=2, interactive=True)
|
19 |
textin.update(lines=8, visible=True)
|