Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -2
src/streamlit_app.py
CHANGED
|
@@ -82,7 +82,12 @@ For any errors or inquiries, please contact us at info@nlpblogs.com
|
|
| 82 |
with st.sidebar:
|
| 83 |
st.write("Use the following code to embed the InfoFinder web app on your website. Feel free to adjust the width and height values to fit your page.")
|
| 84 |
code = '''
|
| 85 |
-
<iframe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
'''
|
| 87 |
st.code(code, language="html")
|
| 88 |
st.text("")
|
|
@@ -111,7 +116,7 @@ if 'question_input' not in st.session_state:
|
|
| 111 |
|
| 112 |
# --- Model Loading and Caching ---
|
| 113 |
@st.cache_resource
|
| 114 |
-
def
|
| 115 |
"""Initializes and caches the GLiNER model."""
|
| 116 |
try:
|
| 117 |
return GLiNER.from_pretrained("knowledgator/gliner-multitask-v1.0", device="cpu")
|
|
|
|
| 82 |
with st.sidebar:
|
| 83 |
st.write("Use the following code to embed the InfoFinder web app on your website. Feel free to adjust the width and height values to fit your page.")
|
| 84 |
code = '''
|
| 85 |
+
<iframe
|
| 86 |
+
src="https://aiecosystem-question-answering.hf.space"
|
| 87 |
+
frameborder="0"
|
| 88 |
+
width="850"
|
| 89 |
+
height="450"
|
| 90 |
+
></iframe>
|
| 91 |
'''
|
| 92 |
st.code(code, language="html")
|
| 93 |
st.text("")
|
|
|
|
| 116 |
|
| 117 |
# --- Model Loading and Caching ---
|
| 118 |
@st.cache_resource
|
| 119 |
+
def load_gliner_model():
|
| 120 |
"""Initializes and caches the GLiNER model."""
|
| 121 |
try:
|
| 122 |
return GLiNER.from_pretrained("knowledgator/gliner-multitask-v1.0", device="cpu")
|