bigmed@bigmed commited on
Commit
149c4c6
1 Parent(s): de038fc

added github button link

Browse files
Files changed (2) hide show
  1. GitHub.png +0 -0
  2. app.py +7 -7
GitHub.png ADDED
app.py CHANGED
@@ -24,13 +24,13 @@ def answer_question(image, text):
24
  return predicted_answer
25
 
26
 
27
- image = gr.inputs.Image(type="pil")
28
- question = gr.inputs.Textbox(label="Question")
29
- answer = gr.outputs.Textbox(label="Predicted answer")
30
  examples = [["cats.jpg", "How many cats are there?"]]
31
 
32
- title = "Interactive Visual Question Answering demo(BigMed@ai: Artificial Intelligence for Large-Scale Medical Image Analysis)"
33
- description = "Gradio Demo for VQA medical model trained on PathVQA dataset, To use it, upload your image and type a question and click 'submit', or click one of the examples to load them."
34
 
35
  ### link to paper and github code
36
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2102.03334' target='_blank'>BigMed@ai</a> | <a href='https://github.com/dandelin/ViLT' target='_blank'>Github Repo</a></p>"
@@ -42,5 +42,5 @@ interface = gr.Interface(fn=answer_question,
42
  title=title,
43
  description=description,
44
  article=article,
45
- enable_queue=True)
46
- interface.launch(debug=True)
 
24
  return predicted_answer
25
 
26
 
27
+ image = gr.Image(type="pil")
28
+ question = gr.Textbox(label="Question")
29
+ answer = gr.Textbox(label="Predicted answer")
30
  examples = [["cats.jpg", "How many cats are there?"]]
31
 
32
+ title = "Interactive Visual Question Answering demo (BigMed@ai: Artificial Intelligence for Large-Scale Medical Image Analysis)"
33
+ description = "<div style='display: flex;align-items: center;justify-content: space-between;'><p style='width:60vw;'>Gradio Demo for VQA medical model trained on PathVQA dataset, To use it, upload your image and type a question and click 'submit', or click one of the examples to load them.</p><a href='https://github.com/dandelin/ViLT' target='_blank' class='link'><img src='file/GitHub.png' style='justify-self:margin-top:0.5em;center; width:calc(200px + 5vw);'></a></div>"
34
 
35
  ### link to paper and github code
36
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2102.03334' target='_blank'>BigMed@ai</a> | <a href='https://github.com/dandelin/ViLT' target='_blank'>Github Repo</a></p>"
 
42
  title=title,
43
  description=description,
44
  article=article,
45
+ )
46
+ interface.launch(debug=True, enable_queue=True)