Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,13 +37,14 @@ class ChatBot:
|
|
37 |
json=data,
|
38 |
)
|
39 |
response_json = response.json()
|
40 |
-
return
|
41 |
|
42 |
def get_history(self) -> list:
|
43 |
return self.contents
|
44 |
|
45 |
# Streamlit app
|
46 |
-
st.
|
|
|
47 |
|
48 |
st.sidebar.title("Upload Image or Take a Picture")
|
49 |
uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
@@ -54,7 +55,6 @@ if uploaded_file is not None:
|
|
54 |
buffered = io.BytesIO()
|
55 |
image.save(buffered, format="JPEG")
|
56 |
image_base64 = base64.b64encode(buffered.getvalue()).decode()
|
57 |
-
|
58 |
api_key = os.environ["GEMINI_API_KEY"] # st.sidebar.text_input("Enter your API key", type="password")
|
59 |
|
60 |
if api_key:
|
|
|
37 |
json=data,
|
38 |
)
|
39 |
response_json = response.json()
|
40 |
+
return response_json
|
41 |
|
42 |
def get_history(self) -> list:
|
43 |
return self.contents
|
44 |
|
45 |
# Streamlit app
|
46 |
+
st.set_page_config(layout="wide")
|
47 |
+
st.title("World Model")
|
48 |
|
49 |
st.sidebar.title("Upload Image or Take a Picture")
|
50 |
uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
|
|
55 |
buffered = io.BytesIO()
|
56 |
image.save(buffered, format="JPEG")
|
57 |
image_base64 = base64.b64encode(buffered.getvalue()).decode()
|
|
|
58 |
api_key = os.environ["GEMINI_API_KEY"] # st.sidebar.text_input("Enter your API key", type="password")
|
59 |
|
60 |
if api_key:
|