LuisBlanche commited on
Commit
75e8024
·
verified ·
1 Parent(s): 3e92c47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -109,6 +109,7 @@ class PDFPoster:
109
  ]
110
  )
111
  )
 
112
 
113
  # Function to apply conditional formatting
114
  def apply_conditional_styles(table, data):
@@ -271,15 +272,13 @@ class PDFPoster:
271
  return party
272
 
273
 
274
- def infer(deputy_name, message_1, message_2):
275
- pdfposter = PDFPoster(deputy_name)
 
 
 
276
 
277
 
278
- examples = [
279
- "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k",
280
- "An astronaut riding a green horse",
281
- "A delicious ceviche cheesecake slice",
282
- ]
283
 
284
  css="""
285
  #col-container {
@@ -326,10 +325,11 @@ with gr.Blocks(css=css) as demo:
326
  )
327
 
328
 
 
329
 
330
  run_button.click(
331
  fn = infer,
332
- inputs = [deputy, message_1, message_2],
333
  outputs = [result]
334
  )
335
 
 
109
  ]
110
  )
111
  )
112
+ return pdf_filename
113
 
114
  # Function to apply conditional formatting
115
  def apply_conditional_styles(table, data):
 
272
  return party
273
 
274
 
275
+ def infer(deputy_name, message_1, message_2, vote_id_list):
276
+ pdfposter = PDFPoster(deputy_name, vote_id_list)
277
+ return pdfposter.generate_poster(message_1, message_2)
278
+
279
+
280
 
281
 
 
 
 
 
 
282
 
283
  css="""
284
  #col-container {
 
325
  )
326
 
327
 
328
+ vote_list = [3213, 1403, 325, 210, 44]
329
 
330
  run_button.click(
331
  fn = infer,
332
+ inputs = [deputy, message_1, message_2, vote_list],
333
  outputs = [result]
334
  )
335