Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def call_huggingface_api(prompt, api_key):
|
|
| 92 |
elif response.status_code == 401:
|
| 93 |
print(f"❌ [{model_id}] YETKİSİZ! Token kontrol edin.")
|
| 94 |
print(f" Yanıt: {response.text[:300]}")
|
| 95 |
-
return "❌ Token geçersiz. Lütfen
|
| 96 |
|
| 97 |
elif response.status_code == 422:
|
| 98 |
print(f"⚠️ [{model_id}] Format hatası: {response.text[:200]}")
|
|
@@ -198,7 +198,7 @@ def transcribe(audio_path: str, progress=gr.Progress()):
|
|
| 198 |
|
| 199 |
# ==================== UI (GRADIO) ====================
|
| 200 |
|
| 201 |
-
with gr.Blocks(title="
|
| 202 |
|
| 203 |
gr.HTML("""
|
| 204 |
<style>
|
|
@@ -206,8 +206,8 @@ with gr.Blocks(title="Ses Deşifre Pro") as demo:
|
|
| 206 |
.gradio-container { max-width: 900px !important; margin: auto !important; }
|
| 207 |
</style>
|
| 208 |
<div style="text-align: center; padding: 30px; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); border-radius: 20px; margin-bottom: 20px; color: white;">
|
| 209 |
-
<h1 style="font-size: 2.2rem; margin: 0;">🎙️
|
| 210 |
-
<p style="opacity: 0.9;">
|
| 211 |
</div>
|
| 212 |
""")
|
| 213 |
|
|
@@ -229,7 +229,7 @@ with gr.Blocks(title="Ses Deşifre Pro") as demo:
|
|
| 229 |
|
| 230 |
with gr.Row():
|
| 231 |
api_key_input = gr.Textbox(
|
| 232 |
-
label="🔑 HF Token (Opsiyonel -
|
| 233 |
placeholder=secret_status,
|
| 234 |
type="password",
|
| 235 |
value="" if hf_secret_loaded else None
|
|
|
|
| 92 |
elif response.status_code == 401:
|
| 93 |
print(f"❌ [{model_id}] YETKİSİZ! Token kontrol edin.")
|
| 94 |
print(f" Yanıt: {response.text[:300]}")
|
| 95 |
+
return "❌ Token geçersiz. Lütfen 'Fine-grained' token oluşturup 'Inference' yetkisi verin."
|
| 96 |
|
| 97 |
elif response.status_code == 422:
|
| 98 |
print(f"⚠️ [{model_id}] Format hatası: {response.text[:200]}")
|
|
|
|
| 198 |
|
| 199 |
# ==================== UI (GRADIO) ====================
|
| 200 |
|
| 201 |
+
with gr.Blocks(title="Voice to Text Manager") as demo:
|
| 202 |
|
| 203 |
gr.HTML("""
|
| 204 |
<style>
|
|
|
|
| 206 |
.gradio-container { max-width: 900px !important; margin: auto !important; }
|
| 207 |
</style>
|
| 208 |
<div style="text-align: center; padding: 30px; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); border-radius: 20px; margin-bottom: 20px; color: white;">
|
| 209 |
+
<h1 style="font-size: 2.2rem; margin: 0;">🎙️ Voice to Text Manager</h1>
|
| 210 |
+
<p style="opacity: 0.9; font-size: 1.1rem;">1-2 saatlik ses kayıtlarını rahatça deşifre edebilir ve işleyebilirsiniz.</p>
|
| 211 |
</div>
|
| 212 |
""")
|
| 213 |
|
|
|
|
| 229 |
|
| 230 |
with gr.Row():
|
| 231 |
api_key_input = gr.Textbox(
|
| 232 |
+
label="🔑 HF Token (Opsiyonel - Kendi Tokeninizi Ekleyebilirsiniz)",
|
| 233 |
placeholder=secret_status,
|
| 234 |
type="password",
|
| 235 |
value="" if hf_secret_loaded else None
|