akhooli commited on
Commit
3f0fa7e
1 Parent(s): 52c0ef5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 (default = 0.95 for all examples)
11
- - Clear and enter new prompt or select another example to rerenerate
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 your prompt or select from examples:", placeholder="أنا الذي", lines=1),
24
- gr.inputs.Slider(0.70, 1.0, step=0.01, label='control temperature')
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