RameshJ commited on
Commit
4d66af2
Β·
verified Β·
1 Parent(s): 21f5e3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -38,6 +38,14 @@ if page == "Charges Incurred":
38
  elif page == "Invoices to Table":
39
  st.title("Invoice Table Extractor")
40
 
 
 
 
 
 
 
 
 
41
  uploaded_file = st.file_uploader("πŸ“€ Upload Invoice Image", type=["jpg", "jpeg", "png"])
42
  col1, col2 = st.columns([1.5, 1]) # col1 = processing, col2 = image
43
 
@@ -51,18 +59,7 @@ elif page == "Invoices to Table":
51
  st.subheader("πŸ–ΌοΈ Invoice Preview")
52
  st.image(uploaded_file, use_container_width=True)
53
 
54
- with col1:
55
- col1, col2 = st.columns([1, 3])
56
- with col1:
57
- st.markdown("### πŸ”’ Select Max Token Limit")
58
- selected_token_limit = st.radio(
59
- "Choose token limit for LLM:",
60
- options=[512, 1024, 2048, 4096],
61
- index=3,
62
- horizontal=True,
63
- key="token_selector"
64
- )
65
-
66
  with col1:
67
  with st.spinner("πŸ” Running OCR..."):
68
  text = run_ocr_with_gcv(image_path)
 
38
  elif page == "Invoices to Table":
39
  st.title("Invoice Table Extractor")
40
 
41
+ st.sidebar.markdown("### πŸ”’ Max Tokens for LLM")
42
+ selected_token_limit = st.sidebar.radio(
43
+ "Choose max tokens:",
44
+ options=[512, 1024, 2048, 4096],
45
+ index=3,
46
+ key="token_selector_sidebar"
47
+ )
48
+
49
  uploaded_file = st.file_uploader("πŸ“€ Upload Invoice Image", type=["jpg", "jpeg", "png"])
50
  col1, col2 = st.columns([1.5, 1]) # col1 = processing, col2 = image
51
 
 
59
  st.subheader("πŸ–ΌοΈ Invoice Preview")
60
  st.image(uploaded_file, use_container_width=True)
61
 
62
+
 
 
 
 
 
 
 
 
 
 
 
63
  with col1:
64
  with st.spinner("πŸ” Running OCR..."):
65
  text = run_ocr_with_gcv(image_path)