salsarra commited on
Commit
c4f8321
·
verified ·
1 Parent(s): 1aa8163

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -26
app.py CHANGED
@@ -5,6 +5,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification, Auto
5
  import gradio as gr
6
  import re
7
 
 
8
  # Check if GPU is available and use it if possible
9
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
10
 
@@ -226,37 +227,18 @@ h2 {
226
 
227
  .header {
228
  display: flex;
229
- justify-content: space-between;
230
  align-items: center;
231
  padding: 10px;
232
  flex-wrap: wrap;
233
  }
234
 
235
- .header-title-left, .header-title-right, .header-title-center {
236
- flex: 1 1 30%;
237
- text-align: center;
238
- }
239
-
240
- .header-title-left a, .header-title-center a, .header-title-right a {
241
- color: inherit;
242
- text-decoration: none;
243
- font-size: 1em;
244
- display: block;
245
- }
246
-
247
  .header-title-center a {
 
248
  font-weight: bold; /* Made text bold */
249
  color: darkorange; /* Darker orange color */
250
- }
251
-
252
- .header-title-left a {
253
- color: green; /* Changed color to green */
254
- font-weight: bold; /* Made text bold */
255
- }
256
-
257
- .header-title-right a {
258
- color: green; /* Changed color to green */
259
- font-weight: bold; /* Made text bold */
260
  }
261
 
262
  .gr-button {
@@ -276,7 +258,7 @@ h2 {
276
  .footer {
277
  text-align: center;
278
  margin-top: 10px;
279
- font-size: 0.9em;
280
  color: #666;
281
  width: 100%;
282
  }
@@ -294,9 +276,7 @@ h2 {
294
 
295
  with gr.Blocks(css=css) as demo:
296
  with gr.Row(elem_id="header"):
297
- gr.Markdown("<div class='header-title-left'><a href='https://eventdata.utdallas.edu/'>UTD Event Data</a></div>", elem_id="header-title-left")
298
  gr.Markdown("<div class='header-title-center'><a href='https://eventdata.utdallas.edu/conflibert/'>ConfliBERT</a></div>", elem_id="header-title-center")
299
- gr.Markdown("<div class='header-title-right'><a href='https://www.utdallas.edu/'>University of Texas at Dallas</a></div>", elem_id="header-title-right")
300
 
301
  gr.Markdown("Select a task and provide the necessary inputs.")
302
 
@@ -324,6 +304,7 @@ with gr.Blocks(css=css) as demo:
324
  submit_button = gr.Button("Submit", elem_id="gr-button")
325
  submit_button.click(fn=chatbot_interface, inputs=[task, text_input, context_input, question_input], outputs=output)
326
 
 
327
  gr.Markdown("<div class='footer'>Developed By: <a href='https://www.linkedin.com/in/sultan-alsarra-phd-56977a63/' target='_blank'>Sultan Alsarra</a></div>")
328
 
329
  demo.launch(share=True)
 
5
  import gradio as gr
6
  import re
7
 
8
+
9
  # Check if GPU is available and use it if possible
10
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
11
 
 
227
 
228
  .header {
229
  display: flex;
230
+ justify-content: center;
231
  align-items: center;
232
  padding: 10px;
233
  flex-wrap: wrap;
234
  }
235
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  .header-title-center a {
237
+ font-size: 4em; /* Increased font size */
238
  font-weight: bold; /* Made text bold */
239
  color: darkorange; /* Darker orange color */
240
+ text-align: center;
241
+ display: block;
 
 
 
 
 
 
 
 
242
  }
243
 
244
  .gr-button {
 
258
  .footer {
259
  text-align: center;
260
  margin-top: 10px;
261
+ font-size: 0.9em; /* Updated font size */
262
  color: #666;
263
  width: 100%;
264
  }
 
276
 
277
  with gr.Blocks(css=css) as demo:
278
  with gr.Row(elem_id="header"):
 
279
  gr.Markdown("<div class='header-title-center'><a href='https://eventdata.utdallas.edu/conflibert/'>ConfliBERT</a></div>", elem_id="header-title-center")
 
280
 
281
  gr.Markdown("Select a task and provide the necessary inputs.")
282
 
 
304
  submit_button = gr.Button("Submit", elem_id="gr-button")
305
  submit_button.click(fn=chatbot_interface, inputs=[task, text_input, context_input, question_input], outputs=output)
306
 
307
+ gr.Markdown("<div class='footer'><a href='https://eventdata.utdallas.edu/'>UTD Event Data</a> | <a href='https://www.utdallas.edu/'>University of Texas at Dallas</a></div>")
308
  gr.Markdown("<div class='footer'>Developed By: <a href='https://www.linkedin.com/in/sultan-alsarra-phd-56977a63/' target='_blank'>Sultan Alsarra</a></div>")
309
 
310
  demo.launch(share=True)