cecilemacaire commited on
Commit
9790fd3
·
verified ·
1 Parent(s): 29235ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -39,11 +39,6 @@ def get_id_picto_from_predicted_lemma(df_lexicon, lemma):
39
  def generate_html(ids):
40
  html_content = '<html><head><style>'
41
  html_content += '''
42
- body {
43
- display: flex;
44
- flex-wrap: wrap;
45
- justify-content: center;
46
- }
47
  figure {
48
  display: inline-block;
49
  text-align: center;
@@ -86,7 +81,7 @@ def generate_pdf(ids):
86
  y_start = 10
87
  img_width = 50
88
  img_height = 50
89
- spacing = 10
90
  max_width = 297 # A4 landscape width in mm
91
  current_x = x_start
92
  current_y = y_start
@@ -123,7 +118,7 @@ if sentence:
123
  pictogram_ids = [get_id_picto_from_predicted_lemma(lexicon, lemma) for lemma in sentence_to_map]
124
 
125
  html = generate_html(pictogram_ids)
126
- st.components.v1.html(html, height=800, scrolling=True)
127
 
128
  # Container to hold the download button
129
  pdf_path = generate_pdf(pictogram_ids)
 
39
  def generate_html(ids):
40
  html_content = '<html><head><style>'
41
  html_content += '''
 
 
 
 
 
42
  figure {
43
  display: inline-block;
44
  text-align: center;
 
81
  y_start = 10
82
  img_width = 50
83
  img_height = 50
84
+ spacing = 1
85
  max_width = 297 # A4 landscape width in mm
86
  current_x = x_start
87
  current_y = y_start
 
118
  pictogram_ids = [get_id_picto_from_predicted_lemma(lexicon, lemma) for lemma in sentence_to_map]
119
 
120
  html = generate_html(pictogram_ids)
121
+ st.components.v1.html(html, height=500, scrolling=True)
122
 
123
  # Container to hold the download button
124
  pdf_path = generate_pdf(pictogram_ids)