Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
98 |
except NameError:
|
99 |
# Handle the case where 'image' is not defined at all
|
100 |
-
gr.Error("You need to upload an image for
|
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
|
266 |
-
top_K = gr.Slider(1,
|
267 |
-
top_P = gr.Slider(0.0, 1.0, value=0
|
268 |
|
269 |
aaa = gr.ChatInterface(
|
270 |
fn=bot_streaming_T2I,
|
271 |
examples=[
|
272 |
-
["
|
273 |
-
["
|
274 |
-
["
|
275 |
-
["
|
276 |
-
["
|
277 |
-
["
|
278 |
-
["
|
279 |
-
["
|
280 |
-
["
|
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],
|