ANASAKHTAR commited on
Commit
0698467
·
verified ·
1 Parent(s): ef1feef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -6
app.py CHANGED
@@ -69,19 +69,46 @@ def transcribe_audio(audio_file, destination_language):
69
  except Exception as e:
70
  return f"Error during transcription: {str(e)}"
71
 
72
-
73
-
74
  # Gradio interface
75
- with gr.Blocks(css=".background {background: linear-gradient(to right, black, blue);}") as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  with gr.Row(elem_classes="background"):
77
- gr.Markdown("# AI-Powered Language Translation Chatbot")
78
  gr.Markdown(
79
- "This bot allows you to translate English text to various languages or convert audio input into transcribed text and translate it into your desired language."
 
 
 
 
80
  )
81
 
82
  with gr.Tabs(elem_classes="background"):
83
  with gr.Tab("Text Translation"):
84
- text_input = gr.Textbox(label="Input text to translate", lines=6)
85
  language_dropdown = gr.Dropdown(
86
  choices=available_languages, label="Select Destination Language"
87
  )
 
69
  except Exception as e:
70
  return f"Error during transcription: {str(e)}"
71
 
 
 
72
  # Gradio interface
73
+ with gr.Blocks(css="""
74
+ .background {
75
+ background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
76
+ color: white;
77
+ font-family: 'Arial', sans-serif;
78
+ }
79
+ button {
80
+ background-color: #4CAF50;
81
+ color: white;
82
+ border-radius: 5px;
83
+ border: none;
84
+ padding: 10px 20px;
85
+ font-size: 16px;
86
+ cursor: pointer;
87
+ transition: background-color 0.3s;
88
+ }
89
+ button:hover {
90
+ background-color: #45a049;
91
+ }
92
+ input, textarea, select {
93
+ background-color: #f9f9f9;
94
+ color: black;
95
+ border-radius: 5px;
96
+ border: 1px solid #ddd;
97
+ padding: 10px;
98
+ }
99
+ """) as demo:
100
  with gr.Row(elem_classes="background"):
 
101
  gr.Markdown(
102
+ """
103
+ # 🌐 AI-Powered Translation Chatbot
104
+ **Translate text or audio into your desired language with professional precision.**
105
+ """,
106
+ elem_classes="background"
107
  )
108
 
109
  with gr.Tabs(elem_classes="background"):
110
  with gr.Tab("Text Translation"):
111
+ text_input = gr.Textbox(label="Input Text", lines=6, placeholder="Enter your text here...")
112
  language_dropdown = gr.Dropdown(
113
  choices=available_languages, label="Select Destination Language"
114
  )