Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,13 +14,18 @@ index_locations = {"shoe-sizes": "index/cmv'-shoe-sizes-should-be-the-same-for-b
|
|
| 14 |
"best-time-period": "index/cmv'-today-is-the-best-time-period-in-human-history-to-be-alive-for-the-vast-majority-of-people.",
|
| 15 |
}
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
def result_html(result):
|
| 22 |
return (
|
| 23 |
-
f"<div>{(result.
|
|
|
|
| 24 |
)
|
| 25 |
|
| 26 |
|
|
@@ -32,7 +37,7 @@ searcher.set_rm3()
|
|
| 32 |
|
| 33 |
cola, colb, colc = st.columns([5,4,5])
|
| 34 |
with colb:
|
| 35 |
-
st.write(discussion)
|
| 36 |
|
| 37 |
col1, col2 = st.columns([9, 1])
|
| 38 |
with col1:
|
|
|
|
| 14 |
"best-time-period": "index/cmv'-today-is-the-best-time-period-in-human-history-to-be-alive-for-the-vast-majority-of-people.",
|
| 15 |
}
|
| 16 |
|
| 17 |
+
titles = {"shoe-sizes": "Shoes sizes should be the same for both men and women",
|
| 18 |
+
"social-media": "Social Media is the most destructive addiction in our society",
|
| 19 |
+
"depression": "'The others have it worse' argument is terrible and should never be used in an actual conversation with a depressed person",
|
| 20 |
+
"metric-system": "There shouldn't be anything other than the metric system",
|
| 21 |
+
"best-time-period": "Today is the best time period in human history to be alive for the vast majority of people",
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
|
| 25 |
def result_html(result):
|
| 26 |
return (
|
| 27 |
+
f"<div style=\"color:#2a5cb3;font-weight: 500\">{(result.docid)}</div>"
|
| 28 |
+
f"<div>{(result.contents)}</div><hr><br>"
|
| 29 |
)
|
| 30 |
|
| 31 |
|
|
|
|
| 37 |
|
| 38 |
cola, colb, colc = st.columns([5,4,5])
|
| 39 |
with colb:
|
| 40 |
+
st.write(titles[discussion])
|
| 41 |
|
| 42 |
col1, col2 = st.columns([9, 1])
|
| 43 |
with col1:
|