Shami96 commited on
Commit
b7f86f3
·
verified ·
1 Parent(s): d55ae06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -511,17 +511,17 @@ with gr.Blocks(title="Professional Invoice Generator", css=custom_css) as demo:
511
 
512
  # Upload handler: normalize audit choice to the list for detected type
513
  def _remember_and_parse(files):
514
- uploaded = files[0] if isinstance(files, list) else files
515
- out = on_upload(files)
516
- inv_t, mods, parsed_audit = out[0], out[1], out[2]
517
- normalized = _normalize_choice(inv_t, parsed_audit or "")
518
- return (
519
- gr.update(value=uploaded, visible=True), # <- show file
520
- uploaded, # <- save to state
521
- inv_t, mods, normalized,
522
- out[3], out[4], out[5], out[6], out[7],
523
- today_str(), "Auto"
524
- )
525
 
526
  up.upload(
527
  _remember_and_parse,
 
511
 
512
  # Upload handler: normalize audit choice to the list for detected type
513
  def _remember_and_parse(files):
514
+ uploaded = files[0] if isinstance(files, list) else files
515
+ out = on_upload(files)
516
+ inv_t, mods, parsed_audit = out[0], out[1], out[2]
517
+ normalized = _normalize_choice(inv_t, parsed_audit or "")
518
+ return (
519
+ gr.update(value=uploaded, visible=True), # <- show file
520
+ uploaded, # <- save to state
521
+ inv_t, mods, normalized,
522
+ out[3], out[4], out[5], out[6], out[7],
523
+ today_str(), "Auto"
524
+ )
525
 
526
  up.upload(
527
  _remember_and_parse,