Commit
•
5223a76
1
Parent(s):
078a969
Update app.py
Browse files
app.py
CHANGED
@@ -8,15 +8,16 @@ def generate(text):
|
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
11 |
-
["آپارتمان
|
12 |
["شمع 206"],
|
13 |
]
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
-
inputs=gr.inputs.Textbox(lines=
|
18 |
outputs=gr.outputs.Textbox(label="Generated Text"),
|
19 |
-
examples=examples
|
|
|
20 |
)
|
21 |
|
22 |
demo.launch()
|
|
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
11 |
+
["آپارتمان 100 متری توی پیروزی سه خواب"],
|
12 |
["شمع 206"],
|
13 |
]
|
14 |
|
15 |
demo = gr.Interface(
|
16 |
fn=generate,
|
17 |
+
inputs=gr.inputs.Textbox(lines=1, label="Input Text"),
|
18 |
outputs=gr.outputs.Textbox(label="Generated Text"),
|
19 |
+
examples=examples,
|
20 |
+
cache_examples=True,
|
21 |
)
|
22 |
|
23 |
demo.launch()
|