File size: 722 Bytes
0a378f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3
"""
Simple test to verify if the gradio app can start without schema errors
"""

import gradio as gr

def simple_function(message, history):
    return "", history + [[message, "Test response"]]

# Create a simple interface to test
with gr.Blocks() as demo:
    chatbot = gr.Chatbot()
    msg = gr.Textbox()
    
    msg.submit(simple_function, [msg, chatbot], [msg, chatbot])

if __name__ == "__main__":
    print("Testing simple Gradio interface...")
    try:
        demo.launch(server_name="127.0.0.1", server_port=7862, share=False, prevent_thread_lock=True)
        print("✅ Simple Gradio interface works")
    except Exception as e:
        print(f"❌ Simple Gradio interface failed: {e}")