joermd commited on
Commit
8c2dd37
·
verified ·
1 Parent(s): 0c7fde0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -16
app.py CHANGED
@@ -65,7 +65,6 @@ def check_website(url):
65
  # Custom CSS for the interface
66
  custom_css = """
67
  @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');
68
-
69
  :root {
70
  --speedy-primary: #8B4513;
71
  --speedy-dark: #5C2C0B;
@@ -75,7 +74,6 @@ custom_css = """
75
  --speedy-text: #3E2723;
76
  --speedy-border: #DEB887;
77
  }
78
-
79
  .gradio-container {
80
  font-family: 'Cairo', sans-serif !important;
81
  background-color: var(--speedy-bg) !important;
@@ -83,21 +81,18 @@ custom_css = """
83
  max-width: 900px !important;
84
  padding: 2rem !important;
85
  }
86
-
87
  .main-header {
88
  text-align: center;
89
  color: var(--speedy-primary);
90
  font-size: 2.5em;
91
  margin-bottom: 1rem;
92
  }
93
-
94
  .sub-header {
95
  text-align: center;
96
  color: var(--speedy-accent);
97
  font-size: 1.2em;
98
  margin-bottom: 2rem;
99
  }
100
-
101
  .gradio-button {
102
  background: linear-gradient(135deg, #8B4513 0%, #5C2C0B 100%) !important;
103
  color: white !important;
@@ -107,23 +102,19 @@ custom_css = """
107
  font-weight: 600 !important;
108
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
109
  }
110
-
111
  .gradio-button:hover {
112
  transform: translateY(-2px) !important;
113
  box-shadow: 0 6px 12px rgba(92, 44, 11, 0.3) !important;
114
  }
115
-
116
  .gradio-textbox {
117
  border: 2px solid var(--speedy-border) !important;
118
  border-radius: 12px !important;
119
  padding: 0.8em !important;
120
  }
121
-
122
  .gradio-textbox:focus {
123
  border-color: var(--speedy-primary) !important;
124
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2) !important;
125
  }
126
-
127
  .output-panel {
128
  background: white !important;
129
  border-radius: 16px !important;
@@ -132,7 +123,6 @@ custom_css = """
132
  border: 1px solid var(--speedy-border) !important;
133
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
134
  }
135
-
136
  .output-panel:hover {
137
  transform: translateY(-3px) !important;
138
  box-shadow: 0 4px 6px rgba(139, 69, 19, 0.2) !important;
@@ -142,15 +132,15 @@ custom_css = """
142
  # Create Gradio interface
143
  with gr.Blocks(css=custom_css) as demo:
144
  gr.HTML("""
145
- <div class="main-header">سبيدي</div>
146
- <div class="sub-header">فاحص المواقع السريع والذكي</div>
147
  """)
148
 
149
  with gr.Row():
150
  url_input = gr.Textbox(
151
  label="أدخل رابط الموقع",
152
  placeholder="https://example.com",
153
- dir="ltr"
154
  )
155
 
156
  with gr.Row():
@@ -161,19 +151,22 @@ with gr.Blocks(css=custom_css) as demo:
161
  info_output = gr.Textbox(
162
  label="معلومات الموقع",
163
  lines=10,
164
- readonly=True
 
165
  )
166
  with gr.Column():
167
  tips_output = gr.Textbox(
168
  label="نصائح تحسين الموقع",
169
  lines=4,
170
- readonly=True
 
171
  )
172
  with gr.Column():
173
  traffic_output = gr.Textbox(
174
  label="تحليل الزيارات",
175
  lines=4,
176
- readonly=True
 
177
  )
178
 
179
  check_button.click(
 
65
  # Custom CSS for the interface
66
  custom_css = """
67
  @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');
 
68
  :root {
69
  --speedy-primary: #8B4513;
70
  --speedy-dark: #5C2C0B;
 
74
  --speedy-text: #3E2723;
75
  --speedy-border: #DEB887;
76
  }
 
77
  .gradio-container {
78
  font-family: 'Cairo', sans-serif !important;
79
  background-color: var(--speedy-bg) !important;
 
81
  max-width: 900px !important;
82
  padding: 2rem !important;
83
  }
 
84
  .main-header {
85
  text-align: center;
86
  color: var(--speedy-primary);
87
  font-size: 2.5em;
88
  margin-bottom: 1rem;
89
  }
 
90
  .sub-header {
91
  text-align: center;
92
  color: var(--speedy-accent);
93
  font-size: 1.2em;
94
  margin-bottom: 2rem;
95
  }
 
96
  .gradio-button {
97
  background: linear-gradient(135deg, #8B4513 0%, #5C2C0B 100%) !important;
98
  color: white !important;
 
102
  font-weight: 600 !important;
103
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
104
  }
 
105
  .gradio-button:hover {
106
  transform: translateY(-2px) !important;
107
  box-shadow: 0 6px 12px rgba(92, 44, 11, 0.3) !important;
108
  }
 
109
  .gradio-textbox {
110
  border: 2px solid var(--speedy-border) !important;
111
  border-radius: 12px !important;
112
  padding: 0.8em !important;
113
  }
 
114
  .gradio-textbox:focus {
115
  border-color: var(--speedy-primary) !important;
116
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2) !important;
117
  }
 
118
  .output-panel {
119
  background: white !important;
120
  border-radius: 16px !important;
 
123
  border: 1px solid var(--speedy-border) !important;
124
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
125
  }
 
126
  .output-panel:hover {
127
  transform: translateY(-3px) !important;
128
  box-shadow: 0 4px 6px rgba(139, 69, 19, 0.2) !important;
 
132
  # Create Gradio interface
133
  with gr.Blocks(css=custom_css) as demo:
134
  gr.HTML("""
135
+ <div class="main-header" dir="rtl">سبيدي</div>
136
+ <div class="sub-header" dir="rtl">فاحص المواقع السريع والذكي</div>
137
  """)
138
 
139
  with gr.Row():
140
  url_input = gr.Textbox(
141
  label="أدخل رابط الموقع",
142
  placeholder="https://example.com",
143
+ rtl=True # Using rtl parameter instead of dir
144
  )
145
 
146
  with gr.Row():
 
151
  info_output = gr.Textbox(
152
  label="معلومات الموقع",
153
  lines=10,
154
+ readonly=True,
155
+ rtl=True
156
  )
157
  with gr.Column():
158
  tips_output = gr.Textbox(
159
  label="نصائح تحسين الموقع",
160
  lines=4,
161
+ readonly=True,
162
+ rtl=True
163
  )
164
  with gr.Column():
165
  traffic_output = gr.Textbox(
166
  label="تحليل الزيارات",
167
  lines=4,
168
+ readonly=True,
169
+ rtl=True
170
  )
171
 
172
  check_button.click(