utkarshshukla2912 commited on
Commit
7d46a3c
·
1 Parent(s): 6ee36dc

space formatting

Browse files
Files changed (1) hide show
  1. app.py +28 -6
app.py CHANGED
@@ -20,6 +20,9 @@ if logo_path.exists():
20
  except Exception as e:
21
  print(f"⚠️ Unable to load logo.png: {e}")
22
 
 
 
 
23
  # Custom CSS for Ringg branding
24
  custom_css = """
25
  .gradio-container {
@@ -30,12 +33,15 @@ custom_css = """
30
  align-items: center;
31
  justify-content: center;
32
  gap: 20px;
33
- flex-wrap: wrap;
34
  padding: 20px;
35
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
36
  color: white;
37
  border-radius: 10px;
38
  margin-bottom: 20px;
 
 
 
39
  }
40
  .main-header .main-logo {
41
  height: 60px;
@@ -56,6 +62,10 @@ custom_css = """
56
  }
57
  .main-header .main-text {
58
  text-align: left;
 
 
 
 
59
  }
60
  .main-header .main-text h1 {
61
  margin: 0 0 6px;
@@ -63,6 +73,15 @@ custom_css = """
63
  .main-header .main-text p {
64
  margin: 0;
65
  }
 
 
 
 
 
 
 
 
 
66
  .status-dot {
67
  display: inline-block;
68
  width: 8px;
@@ -220,11 +239,14 @@ def create_interface():
220
  title="Ringg STT V0", theme=gr.themes.Soft(), css=custom_css
221
  ) as demo:
222
  status_class = "healthy" if health_status["status"] == "healthy" else "error"
223
- logo_html = (
224
- '<div class="main-logo"><img src="https://storage.googleapis.com/desivocal-prod/desi-vocal/logo.png" width="50" height="50"></div>'
225
- if LOGO_BASE64
226
- else '<div class="main-logo main-logo--placeholder"></div>'
227
- )
 
 
 
228
 
229
  gr.Markdown(f"""
230
  <div class="main-header">
 
20
  except Exception as e:
21
  print(f"⚠️ Unable to load logo.png: {e}")
22
 
23
+ DEFAULT_LOGO_URL = "https://storage.googleapis.com/desivocal-prod/desi-vocal/logo.png"
24
+ LOGO_URL = os.environ.get("STT_LOGO_URL", DEFAULT_LOGO_URL).strip()
25
+
26
  # Custom CSS for Ringg branding
27
  custom_css = """
28
  .gradio-container {
 
33
  align-items: center;
34
  justify-content: center;
35
  gap: 20px;
36
+ flex-wrap: nowrap;
37
  padding: 20px;
38
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
39
  color: white;
40
  border-radius: 10px;
41
  margin-bottom: 20px;
42
+ max-width: 900px;
43
+ margin-left: auto;
44
+ margin-right: auto;
45
  }
46
  .main-header .main-logo {
47
  height: 60px;
 
62
  }
63
  .main-header .main-text {
64
  text-align: left;
65
+ display: flex;
66
+ flex-direction: column;
67
+ justify-content: center;
68
+ min-width: 0;
69
  }
70
  .main-header .main-text h1 {
71
  margin: 0 0 6px;
 
73
  .main-header .main-text p {
74
  margin: 0;
75
  }
76
+ @media (max-width: 640px) {
77
+ .main-header {
78
+ flex-wrap: wrap;
79
+ }
80
+ .main-header .main-text {
81
+ text-align: center;
82
+ width: 100%;
83
+ }
84
+ }
85
  .status-dot {
86
  display: inline-block;
87
  width: 8px;
 
239
  title="Ringg STT V0", theme=gr.themes.Soft(), css=custom_css
240
  ) as demo:
241
  status_class = "healthy" if health_status["status"] == "healthy" else "error"
242
+ if LOGO_URL:
243
+ logo_html = (
244
+ f'<div class="main-logo"><img src="{LOGO_URL}" alt="Ringg Logo"></div>'
245
+ )
246
+ elif LOGO_BASE64:
247
+ logo_html = f'<div class="main-logo"><img src="data:image/png;base64,{LOGO_BASE64}" alt="Ringg Logo"></div>'
248
+ else:
249
+ logo_html = '<div class="main-logo main-logo--placeholder"></div>'
250
 
251
  gr.Markdown(f"""
252
  <div class="main-header">