afrizalha commited on
Commit
2c12e86
1 Parent(s): 378b55a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,7 +16,8 @@ def generate(starting_text, choice, temp, top_p):
16
  elif choice == '25M':
17
  model = tiny
18
  elif choice == "Info":
19
- return desc
 
20
 
21
  results = []
22
  for i in range(5):
@@ -31,7 +32,7 @@ def generate(starting_text, choice, temp, top_p):
31
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
32
  outputs = outputs[:outputs.find(".")]
33
  results.append(outputs)
34
- return "\n\n".join(results)
35
 
36
  with gr.Blocks(theme=gr.themes.Soft()) as app:
37
  starting_text = gr.Textbox(label="Starting text", value="cinta adalah")
 
16
  elif choice == '25M':
17
  model = tiny
18
  elif choice == "Info":
19
+ yield desc
20
+ return
21
 
22
  results = []
23
  for i in range(5):
 
32
  outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
33
  outputs = outputs[:outputs.find(".")]
34
  results.append(outputs)
35
+ yield "\n\n".join(results)
36
 
37
  with gr.Blocks(theme=gr.themes.Soft()) as app:
38
  starting_text = gr.Textbox(label="Starting text", value="cinta adalah")