Spaces:
Sleeping
Sleeping
Update app.py
Browse files94 unmodified lines959697989910010110210310410510610710810911011111211311411511611711811912012194 unmodified lines#chatbot = gr.ChatInterface(respond, type = "messages", theme)with gr.Blocks(theme=theme) as demo:gr.Image(value="scooby.png", height=600, width = 2048, show_label=False, show_share_button = False, show_download_button = False, container=False)gr.Markdown(welcome_message)with gr.Row():with gr.Column():gr.Markdown(topics)with gr.Tabs():with gr.Tabletem("Main Page"):with gr.Row():text_input = gr.Textbox(label="Ask Scooby a question about your pet")# image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")output = gr.Textbox(label="Scooby's Answer")submit_btn = gr.Button("Ask Scooby")submit_btn.click(fn=respond, inputs=text_input, outputs=output)with gr.Tabletem("๐ฒ Recipes"):gr.ChatInterface(fn=respond_recipe,title="Pet Recipe Assistant ๐ฝ๏ธ",textbox=gr.Textbox(placeholder="What does your pet need a recipe for?", label="Recipe Request"),chat_history=True,retry_btn="๐ Try Again",clear_btn="๐งน Clear Chat")submit_btn.click(fn=respond, inputs=text_input, outputs=output)#inputs=[text_input, image_input can be added once error fixed94 unmodified lines959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914094 unmodified lines#chatbot = gr.ChatInterface(respond, type = "messages", theme)import gradio as grwith gr.Blocks(theme=theme) as demo:gr.Image(value="scooby.png",height=600,width=2048,show_label=False,show_share_button=False,show_download_button=False,container=False)gr.Markdown(welcome_message)with gr.Row():with gr.Column():gr.Markdown(topics)with gr.Tabs():with gr.Tab("Main Page"):with gr.Row():text_input = gr.Textbox(label="Ask Scooby a question about your pet")# image_input = gr.Image(type="pil", label="Upload an image of your pet (optional)")output = gr.Textbox(label="Scooby's Answer")submit_btn = gr.Button("Ask Scooby")submit_btn.click(fn=respond, inputs=text_input, outputs=output)with gr.Tab("๐ฒ Recipes"):gr.ChatInterface(fn=respond_recipe,title="Pet Recipe Assistant ๐ฝ๏ธ",textbox=gr.Textbox(placeholder="What does your pet need a recipe for?",label="Recipe Request"),chat_history=True,retry_btn="๐ Try Again",clear_btn="๐งน Clear Chat")
app.py+29-10