Вот тут кнопка "отправить" не работает, пофикси
```
import gradio as gr
from gradio_client import Client
import os
import queue
import threading

# Ensure the server_api_key environment variable is set
server_api_link = os.getenv("server_api_link")

# Initialize the Gradio client with the server API key
client = Client("yuntian-deng/o1")

# Initialize the request queue and lock
request_queue = queue.Queue()
lock = threading.Lock()

def process_queue():
    while True:
        user_input, chat_history, output_msg, output_chatbot = request_queue.get()
        # Process the user input
        chat_counter = len(chat_history)
        result = client.predict(
            inputs=user_input,
            top_p=1,
            temperature=1,
            chat_counter=chat_counter,
            chatbot=chat_history,
            api_name="/predict"
        )
        chatbot_response = result[0][-1][1]
        # Update the chat history
        with lock:
            chat_history.append((user_input, chatbot_response))
            output_chatbot.value = chat_history
            output_msg.value = ""
        request_queue.task_done()

# Start the worker thread
threading.Thread(target=process_queue, daemon=True).start()

def chat_with_gpt(user_input, chat_history, output_msg, output_chatbot):
    # Add the request to the queue
    request_queue.put((user_input, chat_history, output_msg, output_chatbot))

with gr.Blocks(title="Cogrid >> Free o1") as demo:
    with gr.Column(elem_id="user_consent_container") as user_consent_block:
        # Get user consent
        accept_checkbox = gr.Checkbox(visible=False)
        js = "(x) => confirm('By clicking \"OK\", I agree that my data may be published or shared.')"
        with gr.Accordion("User Consent for Data Collection, Use, and Sharing", open=True):
            gr.HTML("""
            <div>
                <p>By using our app, which is powered by OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:</p>
                <ol>
                    <li><strong>Collection:</strong> We may collect information, including the inputs you type into our app, the outputs generated by OpenAI's API, and certain technical details about your device and connection (such as browser type, operating system, and IP address) provided by your device's request headers.</li>
                    <li><strong>Use:</strong> We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications, and for security purposes, such as protecting against unauthorized access and attacks.</li>
                    <li><strong>Sharing and Publication:</strong> Your data, including the technical details collected from your device's request headers, may be published, shared with third parties, or used for analysis and reporting purposes.</li>
                    <li><strong>Data Retention:</strong> We may retain your data, including the technical details collected from your device's request headers, for as long as necessary.</li>
                </ol>
                <p>By continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.</p>
            </div>
            """)

    gr.Markdown("# OpenAI o1-preview by dana56")

    chatbot = gr.Chatbot()
    msg = gr.Textbox(placeholder="Введите сообщение и нажмите Enter...")
    clear = gr.Button("Очистить чат")
    send = gr.Button("Отправить", variant="primary")

    send.click(chat_with_gpt, [msg, chatbot, msg, chatbot], queue=False)
    msg.submit(chat_with_gpt, [msg, chatbot, msg, chatbot], queue=False)
    clear.click(lambda: None, None, chatbot, queue=False)

demo.launch()

```