wldmr commited on
Commit
6d42c53
1 Parent(s): 47ae719

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,10 +1,13 @@
1
- from myrpunct import RestorePuncts
2
  import gradio as gr
3
  import re
 
4
 
5
  def predict(input_text):
6
- rpunct = RestorePuncts()
7
- output_text = rpunct.punctuate(input_text)
 
 
8
  print("Punctuation finished...")
9
 
10
  # restore the carrige returns
 
1
+ from deepmultilingualpunctuation import PunctuationModel
2
  import gradio as gr
3
  import re
4
+
5
 
6
  def predict(input_text):
7
+ #rpunct = RestorePuncts()
8
+ #output_text = rpunct.punctuate(input_text)
9
+ model = PunctuationModel()
10
+ output_text = model.restore_punctuation(input_text)
11
  print("Punctuation finished...")
12
 
13
  # restore the carrige returns