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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -17
app.py CHANGED
@@ -71,42 +71,48 @@ def transcribe_audio(audio_file, destination_language):
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(
 
71
 
72
  # Gradio interface
73
  with gr.Blocks(css="""
74
+ body {
75
+ background: linear-gradient(to right, #1e3c72, #2a5298); /* Professional gradient */
76
+ font-family: 'Roboto', sans-serif; /* Modern font for readability */
77
+ color: #ffffff; /* White text for high contrast */
78
+ }
79
+ h1, h2, h3, label {
80
+ color: #ffffff; /* Ensure headings and labels are visible */
81
  }
82
  button {
83
+ background-color: #4caf50; /* Professional green */
84
  color: white;
 
85
  border: none;
86
+ border-radius: 8px;
87
  padding: 10px 20px;
88
  font-size: 16px;
89
  cursor: pointer;
90
+ transition: all 0.3s ease;
91
  }
92
  button:hover {
93
+ background-color: #45a049; /* Slightly darker green on hover */
94
  }
95
  input, textarea, select {
96
+ background-color: #f0f0f0;
97
+ color: #333333;
 
98
  border: 1px solid #ddd;
99
+ border-radius: 5px;
100
  padding: 10px;
101
+ width: 100%;
102
+ }
103
+ input:focus, textarea:focus, select:focus {
104
+ border-color: #4caf50; /* Highlight input fields on focus */
105
  }
106
  """) as demo:
107
+ with gr.Row():
108
  gr.Markdown(
109
  """
110
+ # 🌐 AI Translation Assistant
111
+ Translate **text or audio** into your desired language with professional accuracy.
112
+ """
 
113
  )
114
 
115
+ with gr.Tabs():
116
  with gr.Tab("Text Translation"):
117
  text_input = gr.Textbox(label="Input Text", lines=6, placeholder="Enter your text here...")
118
  language_dropdown = gr.Dropdown(