Spaces:
Runtime error
Runtime error
Commit
Β·
9d859d6
1
Parent(s):
4a9d67a
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
3 |
def analyze(sentence):
|
4 |
# Create a Translator object
|
5 |
translator = Translator()
|
@@ -24,7 +25,13 @@ def analyze(sentence):
|
|
24 |
else:
|
25 |
return ("ηΈ¦η·γδΊζ¬δΈγγγγγγγδ½Ώγ£γγγγ¬γγ£γγ§γγγΈγγ£γγ«γͺγγ")
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
iface = gr.Interface(fn=analyze, inputs="text", outputs="text")
|
30 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
|
4 |
def analyze(sentence):
|
5 |
# Create a Translator object
|
6 |
translator = Translator()
|
|
|
25 |
else:
|
26 |
return ("ηΈ¦η·γδΊζ¬δΈγγγγγγγδ½Ώγ£γγγγ¬γγ£γγ§γγγΈγγ£γγ«γͺγγ")
|
27 |
|
28 |
+
def func(sentence):
|
29 |
+
try:
|
30 |
+
result = analyze(sentence)
|
31 |
+
except Exception as e:
|
32 |
+
return str(e)
|
33 |
+
else:
|
34 |
+
return result
|
35 |
|
36 |
iface = gr.Interface(fn=analyze, inputs="text", outputs="text")
|
37 |
iface.launch()
|