Spaces:
Sleeping
Sleeping
File size: 505 Bytes
fca82fd 3adcb28 fca82fd 3adcb28 fca82fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import random
import gradio as gr
import os
with gr.Blocks() as demo:
def random_response(message, history):
return random.choice(["Yes", "No"])
with gr.Tab("chat"):
gr.ChatInterface(random_response, title=os.environ.get("EXAMPLE"), description=os.environ.get("SECRET_EXAMPLE"))
with gr.Tab("image"):
gr.Image("images/sainsburys.jpeg")
def run():
demo.launch(server_name="0.0.0.0", server_port=7860, inbrowser=True)
if __name__ == "__main__":
run() |