Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -207,9 +207,12 @@ def process_image(image_input, user_prompt):
|
|
207 |
image_input = image_file.read()
|
208 |
SaveNewFile=False # file is there and this is just prompt inference
|
209 |
else:
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
213 |
|
214 |
st.markdown('Processing image: ' + image_file_name)
|
215 |
base64_image = base64.b64encode(image_input).decode("utf-8")
|
|
|
207 |
image_input = image_file.read()
|
208 |
SaveNewFile=False # file is there and this is just prompt inference
|
209 |
else:
|
210 |
+
if image_input is None:
|
211 |
+
data=False
|
212 |
+
else:
|
213 |
+
image_file_name = image_input.name
|
214 |
+
image_input = image_input.read()
|
215 |
+
SaveNewFile=True
|
216 |
|
217 |
st.markdown('Processing image: ' + image_file_name)
|
218 |
base64_image = base64.b64encode(image_input).decode("utf-8")
|