Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
-
import
|
| 3 |
import streamlit as st
|
| 4 |
-
from datetime import datetime
|
| 5 |
from langchain_community.vectorstores import FAISS
|
| 6 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 7 |
from langchain_huggingface import HuggingFaceEndpoint
|
|
@@ -68,30 +67,6 @@ qa = RetrievalQA.from_chain_type(
|
|
| 68 |
chain_type_kwargs={"prompt": prompt},
|
| 69 |
)
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
def chatbot_response(user_input):
|
| 74 |
-
response = qa.run(user_input)
|
| 75 |
-
return response
|
| 76 |
-
|
| 77 |
-
# Create columns for logos
|
| 78 |
-
col1, col2, col3 = st.columns([2, 3, 2])
|
| 79 |
-
|
| 80 |
-
with col1:
|
| 81 |
-
st.image("Design 3_22.png", width=150, use_column_width=True)
|
| 82 |
-
|
| 83 |
-
with col3:
|
| 84 |
-
st.image("Altereo logo 2023 original - eau et territoires durables.png", width=150, use_column_width=True)
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
st.markdown('<h3 class="centered-text">🤖 AlteriaChat 🤖 </h3>', unsafe_allow_html=True)
|
| 89 |
-
st.markdown('<p class="centered-orange-text">"Votre Réponse à Chaque Défi Méthodologique "</p>', unsafe_allow_html=True)
|
| 90 |
-
|
| 91 |
-
# Input and button for user interaction
|
| 92 |
-
user_input = st.text_input("You:", "")
|
| 93 |
-
submit_button = st.button("Ask 📨")
|
| 94 |
-
|
| 95 |
import psycopg2
|
| 96 |
import streamlit as st
|
| 97 |
from datetime import datetime
|
|
|
|
| 1 |
import os
|
| 2 |
+
import csv
|
| 3 |
import streamlit as st
|
|
|
|
| 4 |
from langchain_community.vectorstores import FAISS
|
| 5 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 6 |
from langchain_huggingface import HuggingFaceEndpoint
|
|
|
|
| 67 |
chain_type_kwargs={"prompt": prompt},
|
| 68 |
)
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
import psycopg2
|
| 71 |
import streamlit as st
|
| 72 |
from datetime import datetime
|