badrex commited on
Commit
406c152
·
verified ·
1 Parent(s): 326640b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -1
app.py CHANGED
@@ -63,6 +63,54 @@ if os.path.exists(examples_dir):
63
  else:
64
  print("Examples directory not found")
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  # Create the Gradio interface
67
  demo = gr.Interface(
68
  fn=predict_dialect,
@@ -70,7 +118,7 @@ demo = gr.Interface(
70
  outputs=gr.Label(num_top_classes=5, label="Predicted Dialect"),
71
  title="🎙️ Arabic Dialect Identification in Speech!",
72
  description="""
73
- <div style="text-align: center;">
74
  <img src="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier/resolve/main/assets/logo.png" alt="Logo" style="width: 200px; height: auto; margin-bottom: 20px;">
75
  <br>
76
  <div style="text-align: center; max-width: 800px; margin: 0 auto; padding: 20px;">
 
63
  else:
64
  print("Examples directory not found")
65
 
66
+
67
+
68
+ # Custom CSS for better styling
69
+ custom_css = """
70
+ <style>
71
+ .centered-content {
72
+ text-align: center;
73
+ max-width: 800px;
74
+ margin: 0 auto;
75
+ padding: 20px;
76
+ }
77
+
78
+ .logo-image {
79
+ width: 200px;
80
+ height: auto;
81
+ margin: 20px auto;
82
+ display: block;
83
+ }
84
+
85
+ .description-text {
86
+ font-size: 16px;
87
+ line-height: 1.6;
88
+ margin-bottom: 20px;
89
+ }
90
+
91
+ .dialect-list {
92
+ font-size: 15px;
93
+ line-height: 1.8;
94
+ text-align: left;
95
+ max-width: 600px;
96
+ margin: 0 auto;
97
+ }
98
+
99
+ .highlight-text {
100
+ font-size: 16px;
101
+ color: #2563eb;
102
+ margin: 20px 0;
103
+ }
104
+
105
+ .footer-text {
106
+ font-size: 13px;
107
+ color: #6b7280;
108
+ margin-top: 20px;
109
+ }
110
+ </style>
111
+ """
112
+
113
+
114
  # Create the Gradio interface
115
  demo = gr.Interface(
116
  fn=predict_dialect,
 
118
  outputs=gr.Label(num_top_classes=5, label="Predicted Dialect"),
119
  title="🎙️ Arabic Dialect Identification in Speech!",
120
  description="""
121
+ <div class="centered-content">
122
  <img src="https://huggingface.co/badrex/mms-300m-arabic-dialect-identifier/resolve/main/assets/logo.png" alt="Logo" style="width: 200px; height: auto; margin-bottom: 20px;">
123
  <br>
124
  <div style="text-align: center; max-width: 800px; margin: 0 auto; padding: 20px;">