Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ pipe = pipeline('text-generation', framework='pt', model='akhooli/ap2023', token
|
|
7 |
samples = [['أنت'],['لولا كتاب'],['ألا ليت'],['يا قدس'],['عيد بأية حال'],['لكل شيء إذا ما'],['.']]
|
8 |
notes = """
|
9 |
- Enter a short prompt or select (click) one of the examples
|
10 |
-
- Control temperture (adjust) through slider (
|
11 |
-
- Clear and enter new prompt or select another example to
|
12 |
- The '.' means start a new line (your prompt need not be long)
|
13 |
- be patient: this runs on CPU (free tier)
|
14 |
"""
|
@@ -20,8 +20,8 @@ def sayPoetry(prompt, temp=0.95):
|
|
20 |
return poetry
|
21 |
poetry = gr.Interface(fn=sayPoetry,
|
22 |
inputs=[
|
23 |
-
gr.inputs.Textbox(label="Enter
|
24 |
-
gr.inputs.Slider(0.
|
25 |
],
|
26 |
outputs=[gr.outputs.Textbox(label="Generated Poetry:")],
|
27 |
|
|
|
7 |
samples = [['أنت'],['لولا كتاب'],['ألا ليت'],['يا قدس'],['عيد بأية حال'],['لكل شيء إذا ما'],['.']]
|
8 |
notes = """
|
9 |
- Enter a short prompt or select (click) one of the examples
|
10 |
+
- Control temperture (adjust) through slider (0.95 for examples). Higher usually better.
|
11 |
+
- Clear and enter new prompt or select another example to regenerate
|
12 |
- The '.' means start a new line (your prompt need not be long)
|
13 |
- be patient: this runs on CPU (free tier)
|
14 |
"""
|
|
|
20 |
return poetry
|
21 |
poetry = gr.Interface(fn=sayPoetry,
|
22 |
inputs=[
|
23 |
+
gr.inputs.Textbox(label="Enter short prompt or select from examples:", placeholder="أنا الذي"),
|
24 |
+
gr.inputs.Slider(0.80, 1.0, step=0.01,default=0.95, label='control temperature')
|
25 |
],
|
26 |
outputs=[gr.outputs.Textbox(label="Generated Poetry:")],
|
27 |
|