Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
def
|
| 5 |
cola = pipeline('text-classification', model='Abirate/bert_fine_tuned_cola')
|
| 6 |
correction = cola(x)
|
| 7 |
return correction
|
| 8 |
|
| 9 |
-
iface = gr.Interface(fn=
|
| 10 |
["Is this sentence correkt."],
|
| 11 |
["I will esteem the country with the biggest economy."]])
|
| 12 |
iface.launch(debug=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
def correct(x):
|
| 5 |
cola = pipeline('text-classification', model='Abirate/bert_fine_tuned_cola')
|
| 6 |
correction = cola(x)
|
| 7 |
return correction
|
| 8 |
|
| 9 |
+
iface = gr.Interface(fn=correct, inputs="text", outputs="text", examples = [
|
| 10 |
["Is this sentence correkt."],
|
| 11 |
["I will esteem the country with the biggest economy."]])
|
| 12 |
iface.launch(debug=True)
|