Spaces:
Runtime error
Runtime error
Adding plotly plot
Browse files
app.py
CHANGED
@@ -25,9 +25,10 @@ def strip_input_str(x):
|
|
25 |
# Specify the characters to remove
|
26 |
characters_to_remove = "ββ‘()γγ:\"γΒ·, ?γ" + punctuation
|
27 |
translating = str.maketrans('', '', characters_to_remove)
|
28 |
-
|
|
|
|
|
29 |
|
30 |
-
return input_str.strip()
|
31 |
|
32 |
# Load the pipeline with the HanmunRoBERTa model
|
33 |
model_pipeline = pipeline(task="text-classification", model="bdsl/HanmunRoBERTa")
|
@@ -44,7 +45,7 @@ remove_punct = st.checkbox(label="Remove punctuation", value=True)
|
|
44 |
input_str = st.text_area(
|
45 |
"Input text",
|
46 |
height=150,
|
47 |
-
value="
|
48 |
|
49 |
# Remove punctuation if checkbox is selected
|
50 |
if remove_punct and input_str:
|
|
|
25 |
# Specify the characters to remove
|
26 |
characters_to_remove = "ββ‘()γγ:\"γΒ·, ?γ" + punctuation
|
27 |
translating = str.maketrans('', '', characters_to_remove)
|
28 |
+
x = x.translate(translating)
|
29 |
+
|
30 |
+
return x.strip()
|
31 |
|
|
|
32 |
|
33 |
# Load the pipeline with the HanmunRoBERTa model
|
34 |
model_pipeline = pipeline(task="text-classification", model="bdsl/HanmunRoBERTa")
|
|
|
45 |
input_str = st.text_area(
|
46 |
"Input text",
|
47 |
height=150,
|
48 |
+
value="ζ¬η₯ ι«ιΊ εδΊθ£ζθ¨γ δΌζε°ι¦, θͺ ζζη η‘ε£θ¨ιδΉεΎ, θΎζ½ ε η¦ εε§η«δ½θ
.")
|
49 |
|
50 |
# Remove punctuation if checkbox is selected
|
51 |
if remove_punct and input_str:
|