Spaces:
Paused
Paused
import gradio as gr | |
from Tabs.Gemini_Chabot_Stable import gemini_chatbot, clear_chat_button, undo_chat_button, clear_chat_history, undo_chat, TITLE, NOTICE, ERRORS, FUTURE_IMPLEMENTATIONS, ABOUT | |
# from Tabs.Gemini_Chatbot_Preview import gemini_chatbot_preview, clear_chat_button_preview, undo_chat_button_preview, clear_chat_history_preview, undo_chat_preview | |
with gr.Blocks(theme=gr.themes.Soft()) as demo: | |
gr.HTML("""<h3 align="center">I strongly recommond duplicate this space for intensive uses!!!</h3>""") | |
# ============================== Stable - START ============================== | |
with gr.Tab("Chat with Gemini 1.5 Flash"): | |
gr.HTML(TITLE) | |
with gr.Row(): | |
gr.Markdown(NOTICE) | |
gr.Markdown(ABOUT) | |
gr.Markdown(ERRORS) | |
gr.Markdown(FUTURE_IMPLEMENTATIONS) | |
gemini_chatbot.render() | |
clear_chat_button.click( | |
fn=clear_chat_history | |
) | |
undo_chat_button.click( | |
fn=undo_chat | |
) | |
# ============================== Stable - END ============================== | |
# ============================== Nightly - START ============================== | |
with gr.Tab("Chat with Gemini 1.5 - Preview"): | |
# gemini_chatbot_preview.render() | |
# clear_chat_button_preview.click( | |
# fn=clear_chat_history_preview | |
# ) | |
# undo_chat_button_preview.click( | |
# fn=undo_chat_preview | |
# ) | |
gr.HTML("<h1 align='center'>π§ Work in progress π§</h1>") | |
# ============================== Nightly - END ============================== | |
demo.queue().launch(debug=True, show_error=True) | |