Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
from transformers import pipeline
|
|
@@ -9,9 +10,9 @@ def get_model(model):
|
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
-
history_keyword_text = st.text_input("Enter users's history keywords (optional, i.e., 'Gates')")
|
| 13 |
|
| 14 |
-
text = st.text_input("Enter a text for auto completion...")
|
| 15 |
|
| 16 |
model = st.selectbox("choose a model", ["roberta-base", "bert-base-uncased", "gpt2", "t5"])
|
| 17 |
|
|
@@ -23,5 +24,6 @@ if text:
|
|
| 23 |
data_load_state.text('')
|
| 24 |
for index, r in enumerate(result):
|
| 25 |
if r['sequence'].lower().strip() in history_keyword_text.lower().strip():
|
|
|
|
| 26 |
result[index]['score']*=0.10
|
| 27 |
st.table(result)
|
|
|
|
| 1 |
+
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
from transformers import pipeline
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
+
history_keyword_text = st.text_input("Enter users's history keywords (optional, i.e., 'Gates')", value="Gates")
|
| 14 |
|
| 15 |
+
text = st.text_input("Enter a text for auto completion...", value='Where is Bill')
|
| 16 |
|
| 17 |
model = st.selectbox("choose a model", ["roberta-base", "bert-base-uncased", "gpt2", "t5"])
|
| 18 |
|
|
|
|
| 24 |
data_load_state.text('')
|
| 25 |
for index, r in enumerate(result):
|
| 26 |
if r['sequence'].lower().strip() in history_keyword_text.lower().strip():
|
| 27 |
+
print(1)
|
| 28 |
result[index]['score']*=0.10
|
| 29 |
st.table(result)
|