Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def text_to_image(prompt, show_thinking=False, cfg_text_scale=4.0, cfg_interval=
|
|
175 |
image_shapes=image_shapes,
|
176 |
)
|
177 |
|
178 |
-
result = {"text": ""}
|
179 |
# Call inferencer with or without think parameter based on user choice
|
180 |
for i in inferencer(text=prompt, think=show_thinking, **inference_hyper):
|
181 |
if type(i) == str:
|
@@ -205,7 +205,7 @@ def image_understanding(image: Image.Image, prompt: str, show_thinking=False,
|
|
205 |
max_think_token_n=max_new_tokens, # Set max_length
|
206 |
)
|
207 |
|
208 |
-
result = {"text": ""}
|
209 |
# Use show_thinking parameter to control thinking process
|
210 |
for i in inferencer(image=image, text=prompt, think=show_thinking,
|
211 |
understanding_output=True, **inference_hyper):
|
@@ -249,7 +249,7 @@ def edit_image(image: Image.Image, prompt: str, show_thinking=False, cfg_text_sc
|
|
249 |
)
|
250 |
|
251 |
# Include thinking parameter based on user choice
|
252 |
-
result = {"text": ""}
|
253 |
for i in inferencer(image=image, text=prompt, think=show_thinking, **inference_hyper):
|
254 |
if type(i) == str:
|
255 |
result["text"] += i
|
|
|
175 |
image_shapes=image_shapes,
|
176 |
)
|
177 |
|
178 |
+
result = {"text": None, "image": None}
|
179 |
# Call inferencer with or without think parameter based on user choice
|
180 |
for i in inferencer(text=prompt, think=show_thinking, **inference_hyper):
|
181 |
if type(i) == str:
|
|
|
205 |
max_think_token_n=max_new_tokens, # Set max_length
|
206 |
)
|
207 |
|
208 |
+
result = {"text": None, "image": None}
|
209 |
# Use show_thinking parameter to control thinking process
|
210 |
for i in inferencer(image=image, text=prompt, think=show_thinking,
|
211 |
understanding_output=True, **inference_hyper):
|
|
|
249 |
)
|
250 |
|
251 |
# Include thinking parameter based on user choice
|
252 |
+
result = {"text": None, "image": None}
|
253 |
for i in inferencer(image=image, text=prompt, think=show_thinking, **inference_hyper):
|
254 |
if type(i) == str:
|
255 |
result["text"] += i
|