Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,6 +65,14 @@ def generate_knowledge_graph(text):
|
|
| 65 |
else:
|
| 66 |
return None
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
# Gradio interface
|
| 69 |
iface = gr.Interface(
|
| 70 |
fn=generate_knowledge_graph,
|
|
@@ -91,26 +99,7 @@ iface = gr.Interface(
|
|
| 91 |
footer a:hover {
|
| 92 |
text-decoration: underline;
|
| 93 |
}
|
| 94 |
-
"""
|
| 95 |
-
)
|
| 96 |
-
|
| 97 |
-
# Custom footer HTML
|
| 98 |
-
footer_html = """
|
| 99 |
-
<footer>
|
| 100 |
-
<p>If you enjoyed the functionality of the app, please leave a like!<br>
|
| 101 |
-
Check out more on <a href="https://www.linkedin.com/in/girish-wangikar/" target="_blank">LinkedIn</a> |
|
| 102 |
-
<a href="https://girishwangikar.github.io/Girish_Wangikar_Portfolio.github.io/" target="_blank">Portfolio</a></p>
|
| 103 |
-
</footer>
|
| 104 |
-
"""
|
| 105 |
-
# Gradio interface
|
| 106 |
-
iface = gr.Interface(
|
| 107 |
-
fn=generate_knowledge_graph,
|
| 108 |
-
inputs=gr.Textbox(lines=10, placeholder="Enter your text here..."),
|
| 109 |
-
outputs=gr.Plot(),
|
| 110 |
-
title="Knowledge Graph Generator",
|
| 111 |
-
description="Enter text to generate a knowledge graph.",
|
| 112 |
-
theme="default",
|
| 113 |
-
css=custom_css,
|
| 114 |
article=footer_html
|
| 115 |
)
|
| 116 |
|
|
|
|
| 65 |
else:
|
| 66 |
return None
|
| 67 |
|
| 68 |
+
# Custom footer HTML
|
| 69 |
+
footer_html = """
|
| 70 |
+
<footer>
|
| 71 |
+
<p>If you enjoyed the functionality of the app, please leave a like!<br>
|
| 72 |
+
Check out more on <a href="https://www.linkedin.com/in/girish-wangikar/" target="_blank">LinkedIn</a> |
|
| 73 |
+
<a href="https://girishwangikar.github.io/Girish_Wangikar_Portfolio.github.io/" target="_blank">Portfolio</a></p>
|
| 74 |
+
</footer>
|
| 75 |
+
"""
|
| 76 |
# Gradio interface
|
| 77 |
iface = gr.Interface(
|
| 78 |
fn=generate_knowledge_graph,
|
|
|
|
| 99 |
footer a:hover {
|
| 100 |
text-decoration: underline;
|
| 101 |
}
|
| 102 |
+
""",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
article=footer_html
|
| 104 |
)
|
| 105 |
|