Spaces:
Sleeping
Sleeping
docker-image-tst
Browse files- .DS_Store +0 -0
- images/sainsburys.jpeg +0 -0
- main.py +10 -5
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
images/sainsburys.jpeg
ADDED
main.py
CHANGED
@@ -3,12 +3,17 @@ import gradio as gr
|
|
3 |
import os
|
4 |
|
5 |
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
12 |
|
13 |
if __name__ == "__main__":
|
14 |
run()
|
|
|
3 |
import os
|
4 |
|
5 |
|
6 |
+
with gr.Blocks() as demo:
|
7 |
+
def random_response(message, history):
|
8 |
+
return random.choice(["Yes", "No"])
|
9 |
|
10 |
+
with gr.Tab("chat"):
|
11 |
+
gr.ChatInterface(random_response, title=os.environ.get("EXAMPLE"), description=os.environ.get("SECRET_EXAMPLE"))
|
12 |
+
with gr.Tab("image"):
|
13 |
+
gr.Image("images/sainsburys.jpeg")
|
14 |
+
|
15 |
+
def run():
|
16 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, inbrowser=True)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
run()
|