File size: 469 Bytes
71736e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from utils.openai_utils import chat_with_bot

def create_chat_tab(chatbot_id_input):
    chatbot_title = gr.Markdown("Welcome to the Chatbot")
    chat_interface = gr.ChatInterface(
        chat_with_bot,
        additional_inputs=[chatbot_id_input],
    )
    share_link = gr.Textbox(label="Share Link", interactive=False)
    
    return {
        "title": chatbot_title,
        "interface": chat_interface,
        "share_link": share_link
    }