1inkusFace commited on
Commit
64a33fa
·
verified ·
1 Parent(s): ea114b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -245,12 +245,12 @@ def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
245
 
246
  def captioning(img):
247
  prompts_array = [
248
- # "Adjectives describing this scene are:",
249
  # "The color scheme of this image is",
250
  # "This scene could be described in detail as",
251
  # "The characters in this scene are",
252
- "The larger details in this scene include",
253
- "The smaller details in this scene include",
254
  # "The feeling this scene seems like",
255
  "The setting of this scene must be located",
256
  # Add more prompts here
@@ -285,7 +285,7 @@ def captioning(img):
285
  do_sample=False,
286
  num_beams=5,
287
  max_length=96,
288
- min_length=16,
289
  top_p=0.9,
290
  repetition_penalty=1.5,
291
  length_penalty=1.0,
@@ -304,8 +304,8 @@ def captioning(img):
304
  **inputf,
305
  do_sample=False,
306
  num_beams=5,
307
- max_length=192,
308
- min_length=96,
309
  top_p=0.9,
310
  repetition_penalty=1.5,
311
  length_penalty=1.0,
@@ -1083,4 +1083,4 @@ if __name__ == "__main__":
1083
  description=description,
1084
  )
1085
  combined_interface = gr.TabbedInterface([demo_interface, text_gen_interface], ["Image Generation", "Text Generation"])
1086
- combined_interface.launch(show_api=False)
 
245
 
246
  def captioning(img):
247
  prompts_array = [
248
+ "Adjectives describing this scene are:",
249
  # "The color scheme of this image is",
250
  # "This scene could be described in detail as",
251
  # "The characters in this scene are",
252
+ # "The larger details in this scene include",
253
+ # "The smaller details in this scene include",
254
  # "The feeling this scene seems like",
255
  "The setting of this scene must be located",
256
  # Add more prompts here
 
285
  do_sample=False,
286
  num_beams=5,
287
  max_length=96,
288
+ #min_length=16,
289
  top_p=0.9,
290
  repetition_penalty=1.5,
291
  length_penalty=1.0,
 
304
  **inputf,
305
  do_sample=False,
306
  num_beams=5,
307
+ max_length=256,
308
+ min_length=192,
309
  top_p=0.9,
310
  repetition_penalty=1.5,
311
  length_penalty=1.0,
 
1083
  description=description,
1084
  )
1085
  combined_interface = gr.TabbedInterface([demo_interface, text_gen_interface], ["Image Generation", "Text Generation"])
1086
+ combined_interface.launch(show_api=False)