awacke1 commited on
Commit
f31c1ef
·
1 Parent(s): e6fc461

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 == "short":
8
  return textin[:-50] + api(textin[-50:])
9
- elif choice == "long":
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
- ["short", "long", "none"], 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)
 
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)