bdda / app.py
shelpeck's picture
Update app.py
54f552d
raw
history blame contribute delete
630 Bytes
# srcs/streamlit_app/app.py
import streamlit as st
import pandas as pd
def main():
st.title('Big Data and Distributed Algorithms')
search = st.text_input('Enter question:')
if search != '':
try:
df = pd.read_csv('q_and_a - Sheet1.csv', header=None)
df.columns = ['q', 'a']
ans = df[df.q.str.lower().str.contains(search)]
for col, row in ans.iterrows():
st.subheader(row[0])
st.caption(row[1])
except:
st.subheader("Question doesn't exist")
# st.table(ans)
if __name__ == '__main__':
main()