Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,11 @@ st.markdown("""
|
|
31 |
st.markdown("<h1 class='title'>🧠 VisionLang</h1>", unsafe_allow_html=True)
|
32 |
st.caption("🚀 Upload files & chat with VisionLang")
|
33 |
|
34 |
-
uploaded_file = st.file_uploader("Upload a File (Image, Document, Code
|
35 |
|
36 |
user_input = st.text_input("Type your message here...", key="chat_input", help="Chat with AI", label_visibility="collapsed")
|
37 |
|
38 |
-
if st.button("
|
39 |
if user_input:
|
40 |
with st.spinner("Processing..."):
|
41 |
response = normal_response(user_input)
|
@@ -48,6 +48,6 @@ if st.session_state.chat_history:
|
|
48 |
with chat_container:
|
49 |
st.markdown("### Chat History")
|
50 |
for user_msg, ai_response in st.session_state.chat_history:
|
51 |
-
st.markdown(f"<div class='user-message'><b>
|
52 |
-
st.markdown(f"<div class='ai-message'><b>
|
53 |
st.markdown("<br>", unsafe_allow_html=True)
|
|
|
31 |
st.markdown("<h1 class='title'>🧠 VisionLang</h1>", unsafe_allow_html=True)
|
32 |
st.caption("🚀 Upload files & chat with VisionLang")
|
33 |
|
34 |
+
uploaded_file = st.file_uploader("Upload a File (Image, Document, Code or Video)", type=["png", "jpg", "jpeg", "pdf", "docx", "txt", "py", "js", "java", "cpp", "mp4"], key="file_uploader")
|
35 |
|
36 |
user_input = st.text_input("Type your message here...", key="chat_input", help="Chat with AI", label_visibility="collapsed")
|
37 |
|
38 |
+
if st.button("Do Magic", key="generate_button", help="Click to get AI response", use_container_width=False):
|
39 |
if user_input:
|
40 |
with st.spinner("Processing..."):
|
41 |
response = normal_response(user_input)
|
|
|
48 |
with chat_container:
|
49 |
st.markdown("### Chat History")
|
50 |
for user_msg, ai_response in st.session_state.chat_history:
|
51 |
+
st.markdown(f"<div class='user-message'><b>You:</b> {user_msg}</div>", unsafe_allow_html=True)
|
52 |
+
st.markdown(f"<div class='ai-message'><b>VisonLang:</b> {ai_response}</div>", unsafe_allow_html=True)
|
53 |
st.markdown("<br>", unsafe_allow_html=True)
|