File size: 1,308 Bytes
c2cae96 e89b401 d1f9e33 ac87ee6 3e10424 ac87ee6 a1b34e7 ac87ee6 a1b34e7 ac87ee6 a1b34e7 ac87ee6 a1b34e7 90a2abe |
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
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() |