Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
-
import
|
3 |
import os
|
4 |
from PIL import Image
|
5 |
import base64
|
6 |
import io
|
7 |
|
8 |
-
|
9 |
-
|
10 |
|
11 |
def image_to_base64(image):
|
12 |
buffered = io.BytesIO()
|
|
|
1 |
import gradio as gr
|
2 |
+
from openai import OpenAI
|
3 |
import os
|
4 |
from PIL import Image
|
5 |
import base64
|
6 |
import io
|
7 |
|
8 |
+
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY")
|
9 |
+
|
10 |
|
11 |
def image_to_base64(image):
|
12 |
buffered = io.BytesIO()
|