Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
-
from
|
| 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
|