Yaron Koresh commited on
Commit
c1c292c
·
verified ·
1 Parent(s): d7de195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -111,7 +111,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css) as demo:
111
  """)
112
  with gr.Row():
113
  prompt = gr.Textbox(
114
- placeholder="Describe the photo...",
115
  container=False,
116
  rtl=True,
117
  max_lines=1
@@ -120,9 +120,14 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css) as demo:
120
  run_button = gr.Button("Run")
121
  result = gr.Image(elem_id="image-container", label="Result", show_label=False, type='filepath')
122
  prompt.input(
123
- fn = limiter,
 
 
 
 
124
  inputs = [prompt],
125
- outputs = [prompt]
 
126
  )
127
  run_button.click(
128
  fn = infer,
 
111
  """)
112
  with gr.Row():
113
  prompt = gr.Textbox(
114
+ placeholder="Describe the photo",
115
  container=False,
116
  rtl=True,
117
  max_lines=1
 
120
  run_button = gr.Button("Run")
121
  result = gr.Image(elem_id="image-container", label="Result", show_label=False, type='filepath')
122
  prompt.input(
123
+ js = """
124
+ function(in,out){
125
+ return [in.slice(0,38)]
126
+ }
127
+ """,
128
  inputs = [prompt],
129
+ outputs = [prompt],
130
+ show_progress= "hidden"
131
  )
132
  run_button.click(
133
  fn = infer,