yenniejun commited on
Commit
4e5b267
Β·
1 Parent(s): ef4bad6

Adding plotly plot

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- input_str = input_str.translate(translating)
 
 
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: