Update app.py
Browse files
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 |
-
|
|
|
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 |
-
|
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")
|