Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,9 @@ from google.genai import types
|
|
| 12 |
|
| 13 |
|
| 14 |
st.title("Bildanalyse mit Gemini")
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
uploaded_file = st.file_uploader("Bild hochladen", type=["jpg", "png", "jpeg"])
|
| 17 |
|
|
@@ -36,9 +39,12 @@ if uploaded_file is not None:
|
|
| 36 |
]
|
| 37 |
)
|
| 38 |
|
| 39 |
-
|
| 40 |
-
st.write("## Analyseergebnis:")
|
| 41 |
-
st.write(response.text)
|
| 42 |
|
| 43 |
except Exception as e:
|
| 44 |
-
st.error(f"Ein Fehler ist aufgetreten: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
st.title("Bildanalyse mit Gemini")
|
| 15 |
+
col1, col2 = st.columns(2)
|
| 16 |
+
|
| 17 |
+
with col1:
|
| 18 |
|
| 19 |
uploaded_file = st.file_uploader("Bild hochladen", type=["jpg", "png", "jpeg"])
|
| 20 |
|
|
|
|
| 39 |
]
|
| 40 |
)
|
| 41 |
|
| 42 |
+
|
|
|
|
|
|
|
| 43 |
|
| 44 |
except Exception as e:
|
| 45 |
+
st.error(f"Ein Fehler ist aufgetreten: {e}")
|
| 46 |
+
with col2:
|
| 47 |
+
if uploaded_file is not None and response not None:
|
| 48 |
+
# Antwort anzeigen
|
| 49 |
+
st.write("## Analyseergebnis:")
|
| 50 |
+
st.write(response.text)
|