Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def read_file(file):
|
|
22 |
st.error("Unsupported file type")
|
23 |
return None
|
24 |
|
25 |
-
st.title("
|
26 |
|
27 |
model_list = [
|
28 |
'girayyagmur/bert-base-turkish-ner-cased',
|
@@ -43,19 +43,13 @@ aggregation = "simple" if model_checkpoint in ["akdeniz27/xlm-roberta-base-turki
|
|
43 |
"asahi417/tner-xlm-roberta-base-ontonotes5"] else "first"
|
44 |
|
45 |
st.subheader("Select Text Input Method")
|
46 |
-
input_method = st.radio("", ('
|
|
|
47 |
|
48 |
-
example_list = [
|
49 |
-
"Mustafa Kemal Atatürk 1919 yılında Samsun'a çıktı.",
|
50 |
-
"""Mustafa Kemal Atatürk, Türk asker, devlet adamı ve Türkiye Cumhuriyeti'nin kurucusudur."""
|
51 |
-
]
|
52 |
|
53 |
-
if input_method ==
|
54 |
-
selected_text = st.selectbox('Select Text from List', example_list, index=0)
|
55 |
-
input_text = st.text_area("Selected Text", selected_text, height=128)
|
56 |
-
elif input_method == "Write or Paste New Text":
|
57 |
input_text = st.text_area('Write or Paste Text Below', value="", height=128)
|
58 |
-
|
59 |
uploaded_file = st.file_uploader("Choose a file", type=["txt", "pdf", "docx"])
|
60 |
if uploaded_file is not None:
|
61 |
input_text = read_file(uploaded_file)
|
|
|
22 |
st.error("Unsupported file type")
|
23 |
return None
|
24 |
|
25 |
+
st.title("Turkish NER Models Testing")
|
26 |
|
27 |
model_list = [
|
28 |
'girayyagmur/bert-base-turkish-ner-cased',
|
|
|
43 |
"asahi417/tner-xlm-roberta-base-ontonotes5"] else "first"
|
44 |
|
45 |
st.subheader("Select Text Input Method")
|
46 |
+
input_method = st.radio("", ('Write or Paste New Text', 'Upload File'))
|
47 |
+
|
48 |
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
if input_method == "Write or Paste New Text":
|
|
|
|
|
|
|
51 |
input_text = st.text_area('Write or Paste Text Below', value="", height=128)
|
52 |
+
elif:
|
53 |
uploaded_file = st.file_uploader("Choose a file", type=["txt", "pdf", "docx"])
|
54 |
if uploaded_file is not None:
|
55 |
input_text = read_file(uploaded_file)
|