Spaces:
Runtime error
Runtime error
JulesBelveze
commited on
Commit
•
92c5968
1
Parent(s):
ec41680
chore: add link to repo to interface
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import spacy
|
4 |
-
import concepcy
|
5 |
|
6 |
LIST_RELATIONS = ["RelatedTo", "FormOf", "IsA", "PartOf", "HasA", "UserFor", "CapableOf", "AtLocation", "Causes",
|
7 |
"HasSubevent", "HasFirstSubevent", "HasLastSubevent", "HasPrerequisite", "HasProperty",
|
@@ -46,11 +45,11 @@ def greet(text, relations, to_enrich):
|
|
46 |
|
47 |
iface = gr.Interface(
|
48 |
fn=greet,
|
49 |
-
title="Playground for concepCy",
|
50 |
description="This demo enables you to play around with SpaCy's concepCy wrapper, a wrapper for ConceptNet!"
|
51 |
"To get started: enter a piece of text, check the relations you are interested in and if you want to "
|
52 |
"retrieve relations at a document-level and/or token-level.\n"
|
53 |
-
"Relations will be displayed as tables on the right hand side! Have fun
|
54 |
inputs=[
|
55 |
gr.Textbox(placeholder="Enter sentence here...", lines=5, value="I love eating pizzas"),
|
56 |
gr.CheckboxGroup(choices=LIST_RELATIONS, value=["IsA"]),
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import spacy
|
|
|
4 |
|
5 |
LIST_RELATIONS = ["RelatedTo", "FormOf", "IsA", "PartOf", "HasA", "UserFor", "CapableOf", "AtLocation", "Causes",
|
6 |
"HasSubevent", "HasFirstSubevent", "HasLastSubevent", "HasPrerequisite", "HasProperty",
|
|
|
45 |
|
46 |
iface = gr.Interface(
|
47 |
fn=greet,
|
48 |
+
title="Playground for <a href='https://github.com/JulesBelveze/concepcy'>concepCy</a>",
|
49 |
description="This demo enables you to play around with SpaCy's concepCy wrapper, a wrapper for ConceptNet!"
|
50 |
"To get started: enter a piece of text, check the relations you are interested in and if you want to "
|
51 |
"retrieve relations at a document-level and/or token-level.\n"
|
52 |
+
"Relations will be displayed as tables on the right hand side! Have fun!\n",
|
53 |
inputs=[
|
54 |
gr.Textbox(placeholder="Enter sentence here...", lines=5, value="I love eating pizzas"),
|
55 |
gr.CheckboxGroup(choices=LIST_RELATIONS, value=["IsA"]),
|