Spaces:
Sleeping
Sleeping
first
Browse files- .idea/Vietnamese_correct_spelling.iml +4 -2
- .idea/misc.xml +1 -1
- app.py +5 -8
- requirements.txt +0 -0
.idea/Vietnamese_correct_spelling.iml
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
-
<content url="file://$MODULE_DIR$"
|
5 |
-
|
|
|
|
|
6 |
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
</component>
|
8 |
</module>
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$">
|
5 |
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
6 |
+
</content>
|
7 |
+
<orderEntry type="jdk" jdkName="Python 3.11 (Vietnamese_correct_spelling)" jdkType="Python SDK" />
|
8 |
<orderEntry type="sourceFolder" forTests="false" />
|
9 |
</component>
|
10 |
</module>
|
.idea/misc.xml
CHANGED
@@ -3,5 +3,5 @@
|
|
3 |
<component name="Black">
|
4 |
<option name="sdkName" value="Python 3.12" />
|
5 |
</component>
|
6 |
-
<component name="ProjectRootManager" version="2" project-jdk-name="Vietnamese_correct_spelling" project-jdk-type="Python SDK" />
|
7 |
</project>
|
|
|
3 |
<component name="Black">
|
4 |
<option name="sdkName" value="Python 3.12" />
|
5 |
</component>
|
6 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (Vietnamese_correct_spelling)" project-jdk-type="Python SDK" />
|
7 |
</project>
|
app.py
CHANGED
@@ -1,14 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
-
import
|
4 |
|
5 |
-
|
6 |
-
print(zero.device) # <-- 'cpu' 🤔
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
print(zero.device) # <-- 'cuda:0' 🤗
|
11 |
-
return f"Hello {zero + n} Tensor"
|
12 |
|
13 |
-
demo = gr.Interface(fn=greet, inputs=gr.
|
14 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import spaces
|
3 |
+
from transformers import pipeline
|
4 |
|
5 |
+
pipe = pipeline("summarization", model="ShynBui/Bartpho_spelling_correction")
|
|
|
6 |
|
7 |
+
def greet(text):
|
8 |
+
return pipe(text)
|
|
|
|
|
9 |
|
10 |
+
demo = gr.Interface(fn=greet, inputs=gr.Text(), outputs=gr.Text())
|
11 |
demo.launch()
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|