Spaces:
Build error
Build error
change
Browse files
app.py
CHANGED
@@ -95,11 +95,13 @@ def wiki_add_text(term):
|
|
95 |
st.session_state['wiki_text'].append(extra_text)
|
96 |
st.session_state['topics'].append(term.lower())
|
97 |
except wikipedia.DisambiguationError as e:
|
|
|
98 |
with st.spinner(text="Woops, ambigious term, recalculating options..."):
|
99 |
st.session_state['nodes'].remove(term)
|
100 |
temp = st.session_state['nodes'] + e.options[:3]
|
101 |
st.session_state['nodes'] = list(set(temp))
|
102 |
-
except wikipedia.WikipediaException:
|
|
|
103 |
st.session_state['nodes'].remove(term)
|
104 |
|
105 |
def wiki_reset_session():
|
|
|
95 |
st.session_state['wiki_text'].append(extra_text)
|
96 |
st.session_state['topics'].append(term.lower())
|
97 |
except wikipedia.DisambiguationError as e:
|
98 |
+
print(e.error)
|
99 |
with st.spinner(text="Woops, ambigious term, recalculating options..."):
|
100 |
st.session_state['nodes'].remove(term)
|
101 |
temp = st.session_state['nodes'] + e.options[:3]
|
102 |
st.session_state['nodes'] = list(set(temp))
|
103 |
+
except wikipedia.WikipediaException as e:
|
104 |
+
print(e.error)
|
105 |
st.session_state['nodes'].remove(term)
|
106 |
|
107 |
def wiki_reset_session():
|