Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
def encode_image(image_path):
|
| 2 |
with open(image_path, "rb") as image_file:
|
| 3 |
return base64.b64encode(image_file.read()).decode('utf-8')
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import base64
|
| 3 |
+
import requests
|
| 4 |
+
import tempfile
|
| 5 |
+
import os
|
| 6 |
+
|
| 7 |
def encode_image(image_path):
|
| 8 |
with open(image_path, "rb") as image_file:
|
| 9 |
return base64.b64encode(image_file.read()).decode('utf-8')
|