Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def greet(
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
7 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from nligraphspacy import NLIGRAPH
|
3 |
|
4 |
+
def greet(text):
|
5 |
+
nligraph = NLIGRAPH.RelationEntityExtract(text)
|
6 |
+
return nligraph.get_seperate_entities()
|
7 |
+
|
8 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="json")
|
9 |
iface.launch()
|