Spaces:
Runtime error
Runtime error
SMeyersMrOvkill commited on
Commit ·
54225d7
1
Parent(s): 5c12313
import base64 NOW
Browse files
app.py
CHANGED
|
@@ -92,11 +92,12 @@ def xform_image_description(img, inst):
|
|
| 92 |
return res.choices[0].text[len(prompt):].split("```")[0]
|
| 93 |
|
| 94 |
def simple_desc(img, prompt):
|
|
|
|
| 95 |
gen = md(prompt, [img])
|
| 96 |
total = ""
|
| 97 |
for resp in gen:
|
| 98 |
print(total := total + resp)
|
| 99 |
-
img.resize((
|
| 100 |
bts = False
|
| 101 |
with open("tmp.png", "rb") as f:
|
| 102 |
bts = f.read()
|
|
|
|
| 92 |
return res.choices[0].text[len(prompt):].split("```")[0]
|
| 93 |
|
| 94 |
def simple_desc(img, prompt):
|
| 95 |
+
import base64
|
| 96 |
gen = md(prompt, [img])
|
| 97 |
total = ""
|
| 98 |
for resp in gen:
|
| 99 |
print(total := total + resp)
|
| 100 |
+
img.resize((192,192)).save("tmp.png")
|
| 101 |
bts = False
|
| 102 |
with open("tmp.png", "rb") as f:
|
| 103 |
bts = f.read()
|