Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import requests
|
|
3 |
import base64
|
4 |
from PIL import Image
|
5 |
import io
|
|
|
6 |
|
7 |
class ChatBot:
|
8 |
def __init__(self, image_base64, api_key):
|
@@ -55,7 +56,7 @@ if uploaded_file is not None:
|
|
55 |
image.save(buffered, format="JPEG")
|
56 |
image_base64 = base64.b64encode(buffered.getvalue()).decode()
|
57 |
|
58 |
-
api_key = st.sidebar.text_input("Enter your API key", type="password")
|
59 |
|
60 |
if api_key:
|
61 |
chatbot = ChatBot(image_base64, api_key)
|
|
|
3 |
import base64
|
4 |
from PIL import Image
|
5 |
import io
|
6 |
+
import os
|
7 |
|
8 |
class ChatBot:
|
9 |
def __init__(self, image_base64, api_key):
|
|
|
56 |
image.save(buffered, format="JPEG")
|
57 |
image_base64 = base64.b64encode(buffered.getvalue()).decode()
|
58 |
|
59 |
+
api_key = os.environ["GEMINI_API_KEY"] # st.sidebar.text_input("Enter your API key", type="password")
|
60 |
|
61 |
if api_key:
|
62 |
chatbot = ChatBot(image_base64, api_key)
|