Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -325,9 +325,10 @@ if len(match_df) > 0:
|
|
325 |
|
326 |
instances = instances[instances.apply(lambda x: x.source_wikidata in [source_wikidata, target_wikidata] and x.target_wikidata in [source_wikidata, target_wikidata], axis=1)]
|
327 |
|
328 |
-
st.write(f"**Total Number of
|
329 |
-
st.write(f"**Number of Instances that support the relation:** {int(rel_data['n_support'])}")
|
330 |
-
st.write(f"**
|
|
|
331 |
|
332 |
st.write("Inferences supporting the relation")
|
333 |
instances[['source_en', 'relation', 'target_en', 'text', 'source_wikidata', 'target_wikidata', 'source', 'page_title', 'score', 'section']]
|
@@ -338,7 +339,7 @@ if len(match_df) > 0:
|
|
338 |
count_dict = dict(Counter(instances.relation.to_list() + neg_instances.relation.to_list()))
|
339 |
count_df = pd.DataFrame.from_dict(count_dict, orient='index')
|
340 |
count_df.columns = ['count']
|
341 |
-
st.write("
|
342 |
count_df
|
343 |
|
344 |
st.write("**Conclusion:**")
|
|
|
325 |
|
326 |
instances = instances[instances.apply(lambda x: x.source_wikidata in [source_wikidata, target_wikidata] and x.target_wikidata in [source_wikidata, target_wikidata], axis=1)]
|
327 |
|
328 |
+
st.write(f"**Total Number of Inference Instances:** {int(rel_data['n_evidence'])}")
|
329 |
+
st.write(f"**Number of Instances that support the most frequent relation:** {int(rel_data['n_support'])}")
|
330 |
+
st.write(f"**Support Ratio:** {rel_data['support_ratio']}")
|
331 |
+
st.write(f"**Average Inference Score:** {rel_data['avg_score']}")
|
332 |
|
333 |
st.write("Inferences supporting the relation")
|
334 |
instances[['source_en', 'relation', 'target_en', 'text', 'source_wikidata', 'target_wikidata', 'source', 'page_title', 'score', 'section']]
|
|
|
339 |
count_dict = dict(Counter(instances.relation.to_list() + neg_instances.relation.to_list()))
|
340 |
count_df = pd.DataFrame.from_dict(count_dict, orient='index')
|
341 |
count_df.columns = ['count']
|
342 |
+
st.write("Inference distribution for above edge")
|
343 |
count_df
|
344 |
|
345 |
st.write("**Conclusion:**")
|