Apoorv Saxena commited on
Commit
eaa2345
1 Parent(s): e372099

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -71,8 +71,21 @@ examples = [
71
  ['World War II', 'followed by'],
72
  ['Apoorv Umang Saxena', 'country']
73
  ]
 
 
 
 
 
 
 
 
 
 
74
  iface = gr.Interface(fn=predict_tail,
75
  inputs=[ent_input, rel_input],
76
  outputs=output,
 
 
 
77
  examples=examples,)
78
  iface.launch()
 
71
  ['World War II', 'followed by'],
72
  ['Apoorv Umang Saxena', 'country']
73
  ]
74
+ title = "Interactive demo: KGT5"
75
+ description = """Demo for <a href='https://arxiv.org/abs/2203.10321'>Sequence-to-Sequence Knowledge Graph Completion and Question Answering </a> (KGT5). This particular model is T5-base model trained on the task of tail prediction on WikiKG90Mv2 dataset (see paper for details). To use it, simply give an entity name and relation and click 'submit'. Upto 25 model predictions will show up in a few seconds. The model works best when the exact relation names that it has been trained on are used.
76
+ <br>
77
+ Under the hood, this demo concatenates the entity and relation, feeds it to the model and then samples 25 sequences, which are then ranked according to their sequence probabilities.
78
+ For more details see the Github repo or the <a href="https://huggingface.co/apoorvumang/kgt5-base-wikikg90mv2">hf model page</a>.
79
+ """
80
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2203.10321'>Sequence-to-Sequence Knowledge Graph Completion and Question Answering </a> | <a href='https://github.com/apoorvumang/kgt5'>Github Repo</a></p>"
81
+
82
+
83
+
84
  iface = gr.Interface(fn=predict_tail,
85
  inputs=[ent_input, rel_input],
86
  outputs=output,
87
+ title=title,
88
+ description=description,
89
+ article=article,
90
  examples=examples,)
91
  iface.launch()