File size: 856 Bytes
643c82f
 
a79a4b2
 
 
80e965a
 
 
 
 
a79a4b2
 
80e965a
 
a79a4b2
 
80e965a
a79a4b2
 
80e965a
 
 
a79a4b2
 
643c82f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import gradio as gr

def hermes_chat(message):
    # Placeholder response logic
    return f"Hermes says: {message}"

def handle_file(file):
    return f"Uploaded file: {file.name}"

with gr.Blocks() as demo:
    gr.Markdown("# 💬 Hermes Chat Interface")
    gr.Markdown("Type your message below or upload a file.")

    with gr.Row():
        chat_input = gr.Textbox(label="You", placeholder="Type your message here...")
        chat_output = gr.Textbox(label="Hermes", interactive=False)

    submit_btn = gr.Button("Send")
    submit_btn.click(fn=hermes_chat, inputs=chat_input, outputs=chat_output)

    gr.Markdown("## 📁 Upload a File")
    file_input = gr.File(label="Choose a file")
    file_status = gr.Textbox(label="File Status", interactive=False)
    file_input.change(fn=handle_file, inputs=file_input, outputs=file_status)

demo.launch()