From d985f12c7cb6e7dcee5f6ee6b1cc887298ac8a5e Mon Sep 17 00:00:00 2001 From: LiorDav Date: Wed, 6 Nov 2024 18:13:08 +0000 Subject: [PATCH] Update app.py --- app.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 5e9b010..48863af 100644 --- a/app.py +++ b/app.py @@ -14,15 +14,18 @@ SYSTEM_PROMPT = { } # Background CSS to include a background image -BACKGROUND_CSS = """ +BACKGROUND_CSS = body { - background-image: url('https://example.com/path/to/your/background-image.jpg'); + background-image: url('https://ibb.co/wYc6RYb'); background-size: cover; + background-position: center; + background-repeat: no-repeat; + background-attachment: fixed; } footer { visibility: hidden; } -""" + # Custom Gradio app with additional features with gr.Blocks(css=BACKGROUND_CSS) as demo: @@ -32,7 +35,6 @@ with gr.Blocks(css=BACKGROUND_CSS) as demo: chatbot = gr.Chatbot(type="messages") msg = gr.Textbox(placeholder="Type your message here...") clear = gr.Button("Clear") - save_chat = gr.Button("Save Chat History") def user(user_message, user_name, mood, history: list): """Appends the user message to the conversation history, prefixed with the user name and mood.""" @@ -74,7 +76,6 @@ with gr.Blocks(css=BACKGROUND_CSS) as demo: bot, chatbot, chatbot ) clear.click(lambda: None, None, chatbot, queue=False) - save_chat.click(lambda history: gr.File.update(value=save_history(history)), chatbot) if __name__ == "__main__": demo.launch()