vikramvasudevan commited on
Commit
4f283a0
·
verified ·
1 Parent(s): cc4c726

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. assets/user.png +0 -0
  2. config.py +1 -0
  3. home.py +1 -1
  4. ui.py +26 -11
assets/user.png ADDED
config.py CHANGED
@@ -9,6 +9,7 @@ class SheamiConfig:
9
  logo_path = os.path.join(base_dir, "assets", "logo.jpg")
10
  logo_small_path = os.path.join(base_dir, "assets", "logo-small.jpg")
11
  favicon_path = os.path.join(base_dir, "assets", "favicon.jpg")
 
12
 
13
  @staticmethod
14
  def get_output_dir(thread_id: str):
 
9
  logo_path = os.path.join(base_dir, "assets", "logo.jpg")
10
  logo_small_path = os.path.join(base_dir, "assets", "logo-small.jpg")
11
  favicon_path = os.path.join(base_dir, "assets", "favicon.jpg")
12
+ user_icon_path = os.path.join(base_dir, "assets", "user.png")
13
 
14
  @staticmethod
15
  def get_output_dir(thread_id: str):
home.py CHANGED
@@ -255,7 +255,7 @@ def format_patient_info(patient):
255
  else:
256
  dob_str = "-"
257
  return (
258
- ("🔒" if locked else "")
259
  + f'**{patient.get("name", "-")}** | **{patient.get("gender", "-")}** | Born: {dob_str}'
260
  )
261
 
 
255
  else:
256
  dob_str = "-"
257
  return (
258
+ ("🔒" if locked else "👤")
259
  + f'**{patient.get("name", "-")}** | **{patient.get("gender", "-")}** | Born: {dob_str}'
260
  )
261
 
ui.py CHANGED
@@ -368,14 +368,18 @@ def get_css():
368
  width: 100%;
369
  height: 80px;
370
  padding-left: 0;
371
- padding-right: 20px;
372
  background: #fafafa;
373
  border-bottom: 1px solid rgba(0,0,0,0.06);
374
  gap: 12px;
375
  }
 
 
 
376
  #logged_in_user input textarea {
377
  font-weight : bold;
378
- color : #00FF00
 
379
  }
380
  #add_patient_modal {
381
  width : 400px;
@@ -644,15 +648,26 @@ def render_top_menu_bar(blocks: gr.Blocks) -> gr.Markdown:
644
  interactive=False,
645
  )
646
  gr.Column() # spacer
647
- email_in = gr.Textbox(
648
- label="👤 You are logged in as",
649
- placeholder="doctor1@sheami.com",
650
- value="petersenclarence@example.org",
651
- interactive=False,
652
- elem_id="logged_in_user",
653
- scale=2,
654
- container=False
655
- )
 
 
 
 
 
 
 
 
 
 
 
656
  return (
657
  email_in,
658
  selected_patient_info,
 
368
  width: 100%;
369
  height: 80px;
370
  padding-left: 0;
371
+ padding-right: 0;
372
  background: #fafafa;
373
  border-bottom: 1px solid rgba(0,0,0,0.06);
374
  gap: 12px;
375
  }
376
+ #logged_in_user {
377
+ height : 80px;
378
+ }
379
  #logged_in_user input textarea {
380
  font-weight : bold;
381
+ color : #00FF00;
382
+ height : 60px;
383
  }
384
  #add_patient_modal {
385
  width : 400px;
 
648
  interactive=False,
649
  )
650
  gr.Column() # spacer
651
+ with gr.Row(scale=2):
652
+ gr.Image(
653
+ SheamiConfig.user_icon_path,
654
+ scale=0,
655
+ container=False,
656
+ show_download_button=False,
657
+ show_fullscreen_button=False,
658
+ show_share_button=False,
659
+ height=30,
660
+ visible=False
661
+ )
662
+ email_in = gr.Text(
663
+ label="👤 You are logged in as",
664
+ placeholder="doctor1@sheami.com",
665
+ value="petersenclarence@example.org",
666
+ interactive=False,
667
+ elem_id="logged_in_user",
668
+ text_align="left",
669
+ scale=4,
670
+ )
671
  return (
672
  email_in,
673
  selected_patient_info,