Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,13 +6,12 @@ import os
|
|
| 6 |
|
| 7 |
st.title('AGGILE: Automated Graph Generation for Inference and Language Exploration')
|
| 8 |
|
| 9 |
-
text = st.
|
| 10 |
|
| 11 |
# Initialize Aggile with your HuggingFace credentials; change the model if needed
|
| 12 |
client = InferenceClient("deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", token=os.getenv('HF_TOKEN'))
|
| 13 |
aggile = Aggile(client=client)
|
| 14 |
# Form triplets from the text from string
|
| 15 |
triplets = aggile.form_triples(text)
|
| 16 |
-
st.text(triplets)
|
| 17 |
# Visualize graph based on generated triplets
|
| 18 |
st.plotly_chart(Graph(triplets).build_graph()) # Saves and shows graph_with_predicates.html
|
|
|
|
| 6 |
|
| 7 |
st.title('AGGILE: Automated Graph Generation for Inference and Language Exploration')
|
| 8 |
|
| 9 |
+
text = st.text_area("Enter your text", "")
|
| 10 |
|
| 11 |
# Initialize Aggile with your HuggingFace credentials; change the model if needed
|
| 12 |
client = InferenceClient("deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", token=os.getenv('HF_TOKEN'))
|
| 13 |
aggile = Aggile(client=client)
|
| 14 |
# Form triplets from the text from string
|
| 15 |
triplets = aggile.form_triples(text)
|
|
|
|
| 16 |
# Visualize graph based on generated triplets
|
| 17 |
st.plotly_chart(Graph(triplets).build_graph()) # Saves and shows graph_with_predicates.html
|