Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
-
import gradio as gr
|
2 |
import os
|
3 |
-
import zipfile
|
4 |
-
from zipfile import ZipFile
|
5 |
-
import shutil
|
6 |
-
from pathlib import Path
|
7 |
|
8 |
-
# Install
|
|
|
|
|
|
|
|
|
9 |
os.system("pip install ./language_tool_python-2.7.1-py3-none-any.whl")
|
10 |
|
11 |
import language_tool_python
|
@@ -19,6 +18,8 @@ def grammar_correction(text):
|
|
19 |
return corrected_text
|
20 |
|
21 |
# Create Gradio UI
|
|
|
|
|
22 |
iface = gr.Interface(fn=grammar_correction,
|
23 |
inputs="text",
|
24 |
outputs="text",
|
|
|
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
# Install Java
|
4 |
+
os.system("apt-get update")
|
5 |
+
os.system("apt-get install -y openjdk-11-jdk")
|
6 |
+
|
7 |
+
# Install language_tool_python from the local .whl file
|
8 |
os.system("pip install ./language_tool_python-2.7.1-py3-none-any.whl")
|
9 |
|
10 |
import language_tool_python
|
|
|
18 |
return corrected_text
|
19 |
|
20 |
# Create Gradio UI
|
21 |
+
import gradio as gr
|
22 |
+
|
23 |
iface = gr.Interface(fn=grammar_correction,
|
24 |
inputs="text",
|
25 |
outputs="text",
|