xu3kev commited on
Commit
c82c53d
1 Parent(s): 52dc724

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -224,7 +224,7 @@ def llm_call(question_prompt, model_name,
224
  top_p=1, n_samples=64, stop=None):
225
  if HUGGINGFACE:
226
  model_inputs = hug_tokenizer([question_prompt], return_tensors="pt").to('cuda')
227
- generated_ids = hug_model.generate(**model_inputs, max_length=1400, temperature=1, num_return_sequences=10, do_sample=True)
228
  responses = hug_tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
229
  codes = []
230
  for response in responses:
@@ -443,7 +443,7 @@ def main():
443
  with gr.Column(scale=1):
444
  canvas = gr.Sketchpad(canvas_size=(512,512), brush=Brush(colors=["black"], default_size=2, color_mode='fixed'))
445
  submit_button = gr.Button("Submit")
446
- with gr.Column(scale=2):
447
  output_gallery = gr.Gallery(
448
  label="Generated images", show_label=False, elem_id="gallery"
449
  , columns=[5], rows=[2], object_fit="contain", height="auto")
 
224
  top_p=1, n_samples=64, stop=None):
225
  if HUGGINGFACE:
226
  model_inputs = hug_tokenizer([question_prompt], return_tensors="pt").to('cuda')
227
+ generated_ids = hug_model.generate(**model_inputs, max_length=1400, temperature=1, num_return_sequences=12, do_sample=True)
228
  responses = hug_tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
229
  codes = []
230
  for response in responses:
 
443
  with gr.Column(scale=1):
444
  canvas = gr.Sketchpad(canvas_size=(512,512), brush=Brush(colors=["black"], default_size=2, color_mode='fixed'))
445
  submit_button = gr.Button("Submit")
446
+ with gr.Column(scale=4):
447
  output_gallery = gr.Gallery(
448
  label="Generated images", show_label=False, elem_id="gallery"
449
  , columns=[5], rows=[2], object_fit="contain", height="auto")