mguven61 commited on
Commit
00bdaed
Β·
verified Β·
1 Parent(s): bedf11b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -97,50 +97,43 @@ demo = gr.Interface(
97
  fn=translate_audio,
98
  inputs=[
99
  gr.Textbox(
100
- label="πŸ’¬ Enter text to translate (optional - will use audio if provided)",
101
  placeholder="Type text here or leave empty to use audio input...",
102
  lines=2
103
  ),
104
  gr.Audio(
105
  type="filepath",
106
  sources=["upload"],
107
- label="πŸ“ Upload Audio File (MP3, WAV, etc.)"
108
  ),
109
  gr.Audio(
110
  sources=["microphone"],
111
- label="🎀 OR Record with Microphone",
112
  type="filepath"
113
  ),
114
  gr.Dropdown(
115
  choices=list(languages.keys()),
116
  value="tr",
117
- label="πŸ—£οΈ Source Language"
118
  ),
119
  gr.Dropdown(
120
  choices=list(languages.keys()),
121
  value="en",
122
- label="🌍 Target Language"
123
  )
124
  ],
125
  outputs=[
126
- gr.Audio(label="πŸ”Š Translated Audio Output"),
127
- gr.Textbox(label="πŸ“ Original Text"),
128
- gr.Textbox(label="🌐 Translated Text"),
129
- gr.Textbox(label="ℹ️ Audio Source Info")
130
  ],
131
 
132
  title="🎀 VoiceAI61 - Universal Voice Translator",
133
  description="πŸš€ Upload an audio file OR record with microphone to translate between languages!",
134
  article="""
135
  <div style="text-align: center; margin-top: 20px;">
136
- <h3>🎯 How to Use:</h3>
137
- <p><strong>Option 1:</strong> πŸ“ Upload an audio file (recommended)</p>
138
- <p><strong>Option 2:</strong> 🎀 Record directly with microphone</p>
139
- <p><strong>Option 3:</strong> πŸ’¬ Type text directly</p>
140
- <p><strong>Then:</strong> Select source and target languages, wait for processing!</p>
141
- <br>
142
- <p>πŸ”§ <strong>Troubleshooting:</strong> If microphone doesn't work, use file upload instead.</p>
143
- <p>πŸ“± <strong>Mobile users:</strong> File upload works better on mobile devices.</p>
144
  </div>
145
  """,
146
 
 
97
  fn=translate_audio,
98
  inputs=[
99
  gr.Textbox(
100
+ label="Enter text to translate",
101
  placeholder="Type text here or leave empty to use audio input...",
102
  lines=2
103
  ),
104
  gr.Audio(
105
  type="filepath",
106
  sources=["upload"],
107
+ label="Upload Audio File"
108
  ),
109
  gr.Audio(
110
  sources=["microphone"],
111
+ label="OR Record with Microphone",
112
  type="filepath"
113
  ),
114
  gr.Dropdown(
115
  choices=list(languages.keys()),
116
  value="tr",
117
+ label="Source Language"
118
  ),
119
  gr.Dropdown(
120
  choices=list(languages.keys()),
121
  value="en",
122
+ label="Target Language"
123
  )
124
  ],
125
  outputs=[
126
+ gr.Audio(label="Translated Audio Output"),
127
+ gr.Textbox(label="Original Text"),
128
+ gr.Textbox(label="Translated Text"),
129
+ gr.Textbox(label="Audio Source Info")
130
  ],
131
 
132
  title="🎀 VoiceAI61 - Universal Voice Translator",
133
  description="πŸš€ Upload an audio file OR record with microphone to translate between languages!",
134
  article="""
135
  <div style="text-align: center; margin-top: 20px;">
136
+ <p>πŸ“± <strong>dear users:</strong> trabzon champion. </p>
 
 
 
 
 
 
 
137
  </div>
138
  """,
139