Update app.py
Browse files
app.py
CHANGED
@@ -110,14 +110,14 @@ Run_Button = st.button("Çalıştır", key=None)
|
|
110 |
|
111 |
if Run_Button and input_text != "":
|
112 |
if task == "Metin Sınıflandırma":
|
113 |
-
pipeline_model = load_pipeline(
|
114 |
output = pipeline_model(input_text)
|
115 |
df = pd.DataFrame(output)
|
116 |
st.subheader(f"{task} Sonuçları")
|
117 |
st.dataframe(df)
|
118 |
|
119 |
elif task == "Duygu Analizi":
|
120 |
-
pipeline_model = load_pipeline(
|
121 |
output = pipeline_model(input_text)
|
122 |
df = pd.DataFrame(output)
|
123 |
st.subheader(f"{task} Sonuçları")
|
@@ -149,7 +149,7 @@ if Run_Button and input_text != "":
|
|
149 |
if model_checkpoint == "asahi417/tner-xlm-roberta-base-ontonotes5":
|
150 |
ent["label"] = spacy_entity_list[tner_entity_list.index(ent["label"])]
|
151 |
else:
|
152 |
-
|
153 |
ent["label"] = "PERSON"
|
154 |
|
155 |
html = spacy.displacy.render(spacy_display, style="ent", minify=True, manual=True, options={"ents": spacy_entity_list})
|
|
|
110 |
|
111 |
if Run_Button and input_text != "":
|
112 |
if task == "Metin Sınıflandırma":
|
113 |
+
pipeline_model = load_pipeline(model_checkpoint, task)
|
114 |
output = pipeline_model(input_text)
|
115 |
df = pd.DataFrame(output)
|
116 |
st.subheader(f"{task} Sonuçları")
|
117 |
st.dataframe(df)
|
118 |
|
119 |
elif task == "Duygu Analizi":
|
120 |
+
pipeline_model = load_pipeline(model_checkpoint, task)
|
121 |
output = pipeline_model(input_text)
|
122 |
df = pd.DataFrame(output)
|
123 |
st.subheader(f"{task} Sonuçları")
|
|
|
149 |
if model_checkpoint == "asahi417/tner-xlm-roberta-base-ontonotes5":
|
150 |
ent["label"] = spacy_entity_list[tner_entity_list.index(ent["label"])]
|
151 |
else:
|
152 |
+
if ent["label"] == "PER":
|
153 |
ent["label"] = "PERSON"
|
154 |
|
155 |
html = spacy.displacy.render(spacy_display, style="ent", minify=True, manual=True, options={"ents": spacy_entity_list})
|