hra commited on
Commit
da4c613
1 Parent(s): 2170c7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -93,12 +93,13 @@ def infer(prompt,
93
  "early_stopping":early_stopping,
94
  "no_repeat_ngram_size":no_repeat_ngram_size,
95
  "num_beams":num_beams,
96
- "return_full_text":return_full_text
 
97
  }
98
 
99
  s = time.time()
100
  response = inference(prompt, params=params)
101
- #print(response)
102
  proc_time = time.time()-s
103
  #print(f"Processing time was {proc_time} seconds")
104
  return response
@@ -166,11 +167,11 @@ with gr.Blocks() as demo:
166
  """Enter a prompt and get the tee shirt design. Use examples as a guide. We use an equally powerful AI model bigscience/bloom."""
167
  )
168
  with gr.Row() as row:
169
- with gr.Column():
170
- textbox = gr.Textbox(placeholder="Enter prompt...", lines=1,label='Your prompt')
171
- btn = gr.Button("Generate")
172
- with gr.Column():
173
- output_image = gr.components.Image(label="Your tee shirt")
174
 
175
 
176
  btn.click(getadvertisement,inputs=[textbox], outputs=[output_image])
 
93
  "early_stopping":early_stopping,
94
  "no_repeat_ngram_size":no_repeat_ngram_size,
95
  "num_beams":num_beams,
96
+ "return_full_text":return_full_text,
97
+ "raw_response":True
98
  }
99
 
100
  s = time.time()
101
  response = inference(prompt, params=params)
102
+ print(response)
103
  proc_time = time.time()-s
104
  #print(f"Processing time was {proc_time} seconds")
105
  return response
 
167
  """Enter a prompt and get the tee shirt design. Use examples as a guide. We use an equally powerful AI model bigscience/bloom."""
168
  )
169
  with gr.Row() as row:
170
+ with gr.Column():
171
+ textbox = gr.Textbox(placeholder="Enter prompt...", lines=1,label='Your prompt')
172
+ btn = gr.Button("Generate")
173
+ with gr.Column():
174
+ output_image = gr.components.Image(label="Your tee shirt")
175
 
176
 
177
  btn.click(getadvertisement,inputs=[textbox], outputs=[output_image])