Spaces:
Runtime error
Runtime error
Updated app.py
Browse files
app.py
CHANGED
|
@@ -1,26 +1,28 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import time
|
| 3 |
import pandas as pd
|
| 4 |
-
import
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
pip install -U sentence-transformers
|
| 8 |
-
|
| 9 |
from sentence_transformers import SentenceTransformer, util
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
# Load document embeddings
|
| 13 |
-
doc_emb = np.loadtxt("abstract-embed.txt", dtype=float)
|
| 14 |
-
#doc_emb
|
| 15 |
-
|
| 16 |
-
# Load data
|
| 17 |
-
df = pd.read_csv("sessions.csv", usecols=['Unique ID', 'Name', 'Description', 'Activity Code', 'Start Time', 'End Time', 'Location Name'])
|
| 18 |
-
#df.head()
|
| 19 |
|
|
|
|
| 20 |
st.title(" Your Top 3 Important Sessions")
|
| 21 |
st.markdown("This application is a dashboard for displaying your top 3 Sessions at the summit")
|
| 22 |
|
| 23 |
doc_emb = np.loadtxt("abstract-embed.txt", dtype=float)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
def main():
|
| 25 |
# display the front end aspect
|
| 26 |
st.markdown(html_temp, unsafe_allow_html = True)
|
|
@@ -66,4 +68,8 @@ def main():
|
|
| 66 |
st.write("Abstract: %s" %doc)
|
| 67 |
st.write("Location: %s" %location)
|
| 68 |
st.write(f"From {start_time} to {end_time}")
|
| 69 |
-
st.write('\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
+
import altair as alt
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
from sentence_transformers import SentenceTransformer, util
|
| 5 |
+
import numpy as np
|
| 6 |
+
from urllib.error import URLError
|
| 7 |
|
| 8 |
# Load document embeddings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# set up title and sidebar
|
| 11 |
st.title(" Your Top 3 Important Sessions")
|
| 12 |
st.markdown("This application is a dashboard for displaying your top 3 Sessions at the summit")
|
| 13 |
|
| 14 |
doc_emb = np.loadtxt("abstract-embed.txt", dtype=float)
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
# Load data
|
| 18 |
+
df = pd.read_csv("sessions.csv", usecols=['Unique ID', 'Name', 'Description', 'Activity Code', 'Start Time', 'End Time', 'Location Name'])
|
| 19 |
+
|
| 20 |
+
# front end elements of the web page
|
| 21 |
+
html_temp = """
|
| 22 |
+
<div style ="background-color:lightblue;padding:13px">
|
| 23 |
+
<h1 style ="color:white;text-align:center;">Sentence Similarity App Nashville Analytic Summit</h1>
|
| 24 |
+
</div>
|
| 25 |
+
"""
|
| 26 |
def main():
|
| 27 |
# display the front end aspect
|
| 28 |
st.markdown(html_temp, unsafe_allow_html = True)
|
|
|
|
| 68 |
st.write("Abstract: %s" %doc)
|
| 69 |
st.write("Location: %s" %location)
|
| 70 |
st.write(f"From {start_time} to {end_time}")
|
| 71 |
+
st.write('\n')
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
if __name__ == "__main__":
|
| 75 |
+
main()
|