Spaces:
Build error
Build error
Update app.py
Browse files1234567import gradio as grdef greet(name):return "Hello " + name + "!!"iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch(12345678910111213141516171819202122232425262728293031323334import gradio as grfrom generic import save_image_visdef generate_viz(URL, question):print(f"Input Image URL: {URL}")print(f"Target Class: {question}")img, html_page, answer = save_image_vis(URL, question)return img, answer, html_pagetitle = "Explain LXMERT 🤯"iface = gr.Interface(fn=generate_viz, inputs=[gr.Text(label="Input Image URL"),gr.Text(label="Input the Question "],outputs=[ gr.Image(label="EXplain Image"), gr.Text(label="Answer"), gr.HTML(label="Visualize Sentence Importance"),],title=title,allow_flagging="never",cache_examples=True,examples=[["./lxmert/experiments/paper/COCO_val2014_000000185590/COCO_val2014_000000185590.jpg", "is the animal eating?"],["./lxmert/experiments/paper/COCO_val2014_000000127510/COCO_val2014_000000127510.jpg", "did he catch the ball?"],["./lxmert/experiments/paper/COCO_val2014_000000324266/COCO_val2014_000000324266.jpg", "is the tub white ?"],["./lxmert/experiments/paper/COCO_val2014_000000200717/COCO_val2014_000000200717.jpg", "did the man just catch the frisbee?"],],)iface.launch(debug=True)
app.py+31-4