Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,8 @@ user_prompt_template = (
|
|
28 |
)
|
29 |
|
30 |
# === Encode uploaded file ===
|
31 |
-
def encode_image_to_base64(
|
32 |
-
return base64.b64encode(
|
33 |
|
34 |
# === Transcription logic ===
|
35 |
def transcribe_image(file):
|
|
|
28 |
)
|
29 |
|
30 |
# === Encode uploaded file ===
|
31 |
+
def encode_image_to_base64(file_bytes):
|
32 |
+
return base64.b64encode(file_bytes()).decode("utf-8")
|
33 |
|
34 |
# === Transcription logic ===
|
35 |
def transcribe_image(file):
|