Spaces:
Runtime error
Runtime error
Peter Michael Gits
Fix Dockerfile directory permissions - create /app as root before switching users
26096f4 | import gradio as gr | |
| import time | |
| def health_check(): | |
| return { | |
| "status": "healthy", | |
| "timestamp": time.time(), | |
| "message": "STT Service Test - Ready for model integration" | |
| } | |
| def placeholder_transcribe(audio): | |
| if audio is None: | |
| return "No audio provided" | |
| return f"Placeholder: Audio received (type: {type(audio)}) - STT model integration pending" | |
| # Create interface | |
| with gr.Blocks(title="STT GPU Service Working Test") as demo: | |
| gr.Markdown("# 🎙️ STT GPU Service - Working Test") | |
| gr.Markdown("Successfully deployed! Ready for STT model integration.") | |
| with gr.Tab("Health Check"): | |
| health_btn = gr.Button("Check Health") | |
| health_output = gr.JSON() | |
| health_btn.click(health_check, outputs=health_output) | |
| with gr.Tab("Audio Test"): | |
| audio_input = gr.Audio(type="numpy") | |
| transcribe_btn = gr.Button("Test Transcribe") | |
| output_text = gr.Textbox() | |
| transcribe_btn.click(placeholder_transcribe, inputs=audio_input, outputs=output_text) | |
| if __name__ == "__main__": | |
| demo.launch() | |