machuofan commited on
Commit
e85e413
·
verified ·
1 Parent(s): 57437f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -94,10 +94,10 @@ def bot_streaming_I2T(message, history):
94
  try:
95
  if image is None:
96
  # Handle the case where image is None
97
- gr.Error("You need to upload an image for LLaVA to work.")
98
  except NameError:
99
  # Handle the case where 'image' is not defined at all
100
- gr.Error("You need to upload an image for LLaVA to work.")
101
 
102
  qs = message['text']
103
  qs = '\x00<image>\x01' + '\n' + qs
@@ -262,22 +262,22 @@ with gr.Blocks(fill_height=True) as demo:
262
  with gr.Accordion("⚙️ Advanced Settings", open=False):
263
  with gr.Row():
264
  guidance_scale = gr.Slider(1.0, 20.0, value=7.0, label="Guidance Scale")
265
- temperature = gr.Slider(0.0, 1.0, value=0.9, label="temperature")
266
- top_K = gr.Slider(1, 8192, value=4096, label="Top K")
267
- top_P = gr.Slider(0.0, 1.0, value=0.99, label="Top P")
268
 
269
  aaa = gr.ChatInterface(
270
  fn=bot_streaming_T2I,
271
  examples=[
272
- ["realxing mountain scene, warm colors, sunset, river in front of mountain, pine trees, oil painting, photo realistic, blue ambiant lighting", 7.0, 1.0, 0, 1.0],
273
- ["Brandon Routh, color portrait by Herb Ritts, 1980s1990s", 7.0, 1.0, 0, 1.0],
274
- ["cabbage, Shot on 35mm, UltraWide Angle, Depth of Field, DOF, shutter Speed 11000, F22, photography, 8k", 7.0, 1.0, 0, 1.0],
275
- ["award winning photography, beautiful modern skyline, city sunset ", 7.0, 1.0, 0, 1.0],
276
- ["New York City at night with starry night vincent van gogh style", 7.0, 1.0, 0, 1.0],
277
- ["cute happy hedgehog holding sunflower in the morning ", 7.0, 1.0, 0, 1.0],
278
- ["cherry tree on the surface of the moon", 7.0, 1.0, 0, 1.0],
279
- ["a closeup of the owls eyes piercing through a dense fog. Blended in the ethereal, volumetric dust particles and embers, bokeh embers, microplumes of sand smoke, textured ash and smoke. Elegant, hyperdetailed, insane details, Unreal Engine, Cinematic, White Balance, 32k, Super Resolution, Chiaroscuro", 7.0, 1.0, 0, 1.0],
280
- ["Automotive front Photo Environment muddy Road in the jungle, golden hour Car vintage concept sports car yellow at high speed, motion blur, photo taken with Canon Eos R5 8k 45mp telephoto lens. 3D render, Vray, PBR car paint texture, hyper detailed, intricate symmetrical shape", 7.0, 1.0, 0, 1.0],
281
  ],
282
  stop_btn="Stop Generation",
283
  additional_inputs = [guidance_scale, temperature, top_K, top_P],
 
94
  try:
95
  if image is None:
96
  # Handle the case where image is None
97
+ gr.Error("You need to upload an image for UniTok to work.")
98
  except NameError:
99
  # Handle the case where 'image' is not defined at all
100
+ gr.Error("You need to upload an image for UniTok to work.")
101
 
102
  qs = message['text']
103
  qs = '\x00<image>\x01' + '\n' + qs
 
262
  with gr.Accordion("⚙️ Advanced Settings", open=False):
263
  with gr.Row():
264
  guidance_scale = gr.Slider(1.0, 20.0, value=7.0, label="Guidance Scale")
265
+ temperature = gr.Slider(0.0, 1.0, value=1.0, label="temperature")
266
+ top_K = gr.Slider(1, 4096, value=2048, label="Top K")
267
+ top_P = gr.Slider(0.0, 1.0, value=1.0, label="Top P")
268
 
269
  aaa = gr.ChatInterface(
270
  fn=bot_streaming_T2I,
271
  examples=[
272
+ ["Magic mushroom in the forest", 5.0, 1.0, 2048, 1.0],
273
+ ["cherry tree on the surface of the moon", 5.0, 1.0, 2048, 1.0],
274
+ ["New York City at night with starry night vincent van gogh style", 5.0, 1.0, 2048, 1.0],
275
+ ["cavalier king charles spaniel being cute and ultra realistic with cute sunglasses", 5.0, 1.0, 2048, 1.0],
276
+ ["anthophomorphic Shaman owl portrait, light rays, facepaint, detailed, digital photography", 5.0, 1.0, 2048, 1.0],
277
+ ["denzel washington as lor krishna front facing looking straight into the eye in the battlefield of kurukshetra", 5.0, 1.0, 2048, 1.0],
278
+ ["realxing mountain scene, warm colors, sunset, river in front of mountain, pine trees, oil painting, photo realistic, blue ambiant lighting", 5.0, 1.0, 2048, 1.0],
279
+ ["the ship of the dead by aaron hawthorne, in the style of en plein air beach scenes, ian miller, jasper francis cropsey, joram roukes, emotional and dramatic scenes, rusty debris, danish golden age, sunset", 5.0, 1.0, 2048, 1.0],
280
+ ["japanese sakura bonsai, best quality, ultra high res, scene featuring volumetric lighting, Urban alleyway, warm color temperature, Straight On, variable depth of field, dynamic composition", 5.0, 1.0, 2048, 1.0],
281
  ],
282
  stop_btn="Stop Generation",
283
  additional_inputs = [guidance_scale, temperature, top_K, top_P],