cpg716's picture
Update app.py
ac87ee6 verified
raw
history blame
1.31 kB
import gradio as gr
import torch
# Create a simple interface
with gr.Blocks(title="Simple Qwen Test") as demo:
gr.Markdown("# Simple Qwen Test")
gr.Markdown("This is a minimal test to check if the Space is working.")
with gr.Tab("Basic Test"):
with gr.Row():
with gr.Column():
test_button = gr.Button("Run Basic Test")
with gr.Column():
test_result = gr.Textbox(label="Test Results", lines=10)
def basic_test():
try:
# Just print system info
import sys
import transformers
result = []
result.append(f"Python version: {sys.version}")
result.append(f"PyTorch version: {torch.__version__}")
result.append(f"Transformers version: {transformers.__version__}")
result.append("Basic test successful!")
return "\n".join(result)
except Exception as e:
import traceback
return f"Error: {str(e)}\n\n{traceback.format_exc()}"
test_button.click(
fn=basic_test,
inputs=[],
outputs=[test_result]
)
# Launch the app
demo.launch()