Update app.py
Browse files
app.py
CHANGED
|
@@ -10,14 +10,14 @@ working_directory = os.path.dirname(os.path.abspath(__file__))
|
|
| 10 |
|
| 11 |
# Setting the page config
|
| 12 |
st.set_page_config(
|
| 13 |
-
page_title="
|
| 14 |
page_icon="🤖",
|
| 15 |
layout="centered",
|
| 16 |
initial_sidebar_state="expanded",
|
| 17 |
)
|
| 18 |
|
| 19 |
with st.sidebar:
|
| 20 |
-
selected = option_menu("
|
| 21 |
["Chatbot",
|
| 22 |
"Image Captioning",
|
| 23 |
],
|
|
@@ -39,7 +39,7 @@ if selected == "Chatbot":
|
|
| 39 |
st.session_state.chat_session = model.start_chat(history=[])
|
| 40 |
|
| 41 |
# Streamlit page title
|
| 42 |
-
st.title("
|
| 43 |
|
| 44 |
# Display the chatbot history
|
| 45 |
for message in st.session_state.chat_session.history:
|
|
@@ -47,7 +47,7 @@ if selected == "Chatbot":
|
|
| 47 |
st.markdown(message.parts[0].text)
|
| 48 |
|
| 49 |
# Input field for user's message
|
| 50 |
-
user_prompt = st.chat_input("
|
| 51 |
|
| 52 |
if user_prompt:
|
| 53 |
st.chat_message("user").markdown(user_prompt)
|
|
@@ -61,7 +61,7 @@ if selected == "Chatbot":
|
|
| 61 |
if selected == "Image Captioning":
|
| 62 |
|
| 63 |
# Streamlit title
|
| 64 |
-
st.title("
|
| 65 |
|
| 66 |
upload_image = st.file_uploader("Upload an image...", type=["jpg", "jpeg", "png"])
|
| 67 |
|
|
|
|
| 10 |
|
| 11 |
# Setting the page config
|
| 12 |
st.set_page_config(
|
| 13 |
+
page_title="GnosticDev AI",
|
| 14 |
page_icon="🤖",
|
| 15 |
layout="centered",
|
| 16 |
initial_sidebar_state="expanded",
|
| 17 |
)
|
| 18 |
|
| 19 |
with st.sidebar:
|
| 20 |
+
selected = option_menu("GD AI",
|
| 21 |
["Chatbot",
|
| 22 |
"Image Captioning",
|
| 23 |
],
|
|
|
|
| 39 |
st.session_state.chat_session = model.start_chat(history=[])
|
| 40 |
|
| 41 |
# Streamlit page title
|
| 42 |
+
st.title("Gnosticdev Chatbot")
|
| 43 |
|
| 44 |
# Display the chatbot history
|
| 45 |
for message in st.session_state.chat_session.history:
|
|
|
|
| 47 |
st.markdown(message.parts[0].text)
|
| 48 |
|
| 49 |
# Input field for user's message
|
| 50 |
+
user_prompt = st.chat_input("Preguntame algo...")
|
| 51 |
|
| 52 |
if user_prompt:
|
| 53 |
st.chat_message("user").markdown(user_prompt)
|
|
|
|
| 61 |
if selected == "Image Captioning":
|
| 62 |
|
| 63 |
# Streamlit title
|
| 64 |
+
st.title(" Image Caption Generation📸")
|
| 65 |
|
| 66 |
upload_image = st.file_uploader("Upload an image...", type=["jpg", "jpeg", "png"])
|
| 67 |
|