binxu.wang
commited on
Commit
•
bfd7dfd
1
Parent(s):
59a1177
add
Browse files
app.py
CHANGED
@@ -27,6 +27,10 @@ def generate(prompt):
|
|
27 |
output_all = "\n\n".join(output_texts)
|
28 |
return output_all
|
29 |
|
|
|
30 |
|
31 |
-
iface = gr.Interface(fn=generate,
|
|
|
|
|
|
|
32 |
iface.launch()
|
|
|
27 |
output_all = "\n\n".join(output_texts)
|
28 |
return output_all
|
29 |
|
30 |
+
examples = ["子曰", "子墨子曰", "孟子", "秦王", "子路问仁"]
|
31 |
|
32 |
+
iface = gr.Interface(fn=generate,
|
33 |
+
inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
|
34 |
+
outputs=gr.outputs.Textbox(label="Generated Text"),
|
35 |
+
examples=examples)
|
36 |
iface.launch()
|