ysharma HF staff commited on
Commit
d43929c
·
verified ·
1 Parent(s): e43ab45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -3
app.py CHANGED
@@ -38,6 +38,24 @@ with gr.Blocks() as demo:
38
 
39
  chatbot.like(print_like_dislike, None, None)
40
 
41
- demo.queue()
42
- if __name__ == "__main__":
43
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  chatbot.like(print_like_dislike, None, None)
40
 
41
+ #demo.queue()
42
+
43
+ def echo(message, history):
44
+ return message["text"]
45
+
46
+ demo1 = gr.ChatInterface(fn=echo,
47
+ multimodal=True,
48
+ examples=[[{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}],
49
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}],
50
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://miro.medium.com/v2/resize:fit:930/1*OaV5eb_DRNIJQal_B7-YDQ.jpeg"]}],
51
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://www.gradio.app/_app/immutable/assets/header-image.DJQS6l6U.jpg"]}],
52
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://miro.medium.com/v2/da:true/resize:fit:1024/1*iJArJfAGlqMj7Uz7OU-Hdw.gif"]}],
53
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://digitalpress.fra1.cdn.digitaloceanspaces.com/mhujhsj/2022/09/seaborn.gif"]}],
54
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://user-images.githubusercontent.com/1778297/158659207-04015a06-5cad-4ee1-bdbd-291054551540.png"]}],
55
+ [{"text": "This is a sample text. This is a sample text. This is a sample text.", "files":["https://user-images.githubusercontent.com/1778297/158659207-04015a06-5cad-4ee1-bdbd-291054551540.png"]}]],
56
+ title="Echo Bot",
57
+ #examples_per_page=6,
58
+
59
+ )
60
+ demo1.launch()
61
+ #demo.launch()