gregorlied commited on
Commit
1553629
·
verified ·
1 Parent(s): 43ae925

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -13,12 +13,14 @@ hf_login(token=os.getenv("HF_TOKEN"))
13
 
14
  model_name = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization-FP32"
15
 
 
16
  model = AutoModelForCausalLM.from_pretrained(
17
  model_name,
18
  device_map="auto",
19
  attn_implementation='eager',
20
  trust_remote_code=True,
21
  )
 
22
 
23
  class Person(BaseModel):
24
  life_style: str
@@ -120,23 +122,23 @@ def generate_html_tables(data, selected_fields):
120
  return "<i>Not Available</i>"
121
  if len(items) == 1:
122
  return items[0]
123
- return "<ul>" + "".join(f"<li>{item}</li>" for item in items) + "</ul>"
124
 
125
  table_style = (
126
  "width: 100%;"
127
  "table-layout: fixed;"
128
- "border-collapse: collapse;"
129
- "word-wrap: break-word;"
130
  "height: 100%;"
131
  )
132
 
133
  th_td_style_first = (
 
134
  "padding: 8px;"
135
  "border: 1px solid #ccc;"
136
  "vertical-align: top;"
137
  "text-align: left;"
138
- "height: 30px;"
139
- "overflow: hidden;"
140
  )
141
 
142
  th_td_style_other = (
 
13
 
14
  model_name = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization-FP32"
15
 
16
+ """
17
  model = AutoModelForCausalLM.from_pretrained(
18
  model_name,
19
  device_map="auto",
20
  attn_implementation='eager',
21
  trust_remote_code=True,
22
  )
23
+ """
24
 
25
  class Person(BaseModel):
26
  life_style: str
 
122
  return "<i>Not Available</i>"
123
  if len(items) == 1:
124
  return items[0]
125
+ return "<ul style='margin: 0; padding-left: 1em'>" + "".join(f"<li>{item}</li>" for item in items) + "</ul>"
126
 
127
  table_style = (
128
  "width: 100%;"
129
  "table-layout: fixed;"
130
+ # "border-collapse: collapse;"
131
+ # "word-wrap: break-word;"
132
  "height: 100%;"
133
  )
134
 
135
  th_td_style_first = (
136
+ # "height: 30px;"
137
  "padding: 8px;"
138
  "border: 1px solid #ccc;"
139
  "vertical-align: top;"
140
  "text-align: left;"
141
+ # "overflow: hidden;"
 
142
  )
143
 
144
  th_td_style_other = (