Seth0330 commited on
Commit
60c686c
·
verified ·
1 Parent(s): 3a41351

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,7 +12,7 @@ UNSTRACT_BASE = "https://llmwhisperer-api.us-central.unstract.com/api/v2"
12
  UNSTRACT_API_KEY = os.getenv("UNSTRACT_API_KEY")
13
  OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
14
  OPENROUTER_URL = "https://openrouter.ai/api/v1/chat/completions"
15
- MISTRAL_MODEL = "mistralai/mistral-8b-instruct"
16
 
17
  st.set_page_config(page_title="EZOFIS Document Validation Agent", layout="wide")
18
  st.markdown("""
@@ -39,7 +39,7 @@ col_left, col_right = st.columns([1.35, 1.05])
39
 
40
  with col_left:
41
  # Step 1: Checklist
42
- st.markdown("<span class='step-num'>1</span> <b>Paste Mortgage Checklist (JSON)</b>", unsafe_allow_html=True)
43
  sample_checklist = '''{
44
  "required_documents": [
45
  {"type": "Driver's License", "description": "Government-issued photo ID"},
@@ -53,7 +53,7 @@ with col_left:
53
  ]
54
  }'''
55
  checklist_text = st.text_area(
56
- "Paste or edit your mortgage checklist JSON below:",
57
  value=sample_checklist,
58
  height=220,
59
  key="doc_checklist_json"
@@ -241,7 +241,7 @@ def advanced_llm_verdict(llm_json, min_confidence, status_box=None):
241
  Here is the extracted document information and prior validation result:
242
  {json.dumps(llm_json)}
243
 
244
- The minimum required confidence is {min_confidence}. Should this document be accepted or rejected for a mortgage application, based on all available information?
245
  Respond ONLY as: {{ "accepted": true/false, "reason": "..." }}
246
  """
247
  headers = {
 
12
  UNSTRACT_API_KEY = os.getenv("UNSTRACT_API_KEY")
13
  OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY")
14
  OPENROUTER_URL = "https://openrouter.ai/api/v1/chat/completions"
15
+ MISTRAL_MODEL = "mistralai/ministral-8b"
16
 
17
  st.set_page_config(page_title="EZOFIS Document Validation Agent", layout="wide")
18
  st.markdown("""
 
39
 
40
  with col_left:
41
  # Step 1: Checklist
42
+ st.markdown("<span class='step-num'>1</span> <b>Your Document Checklist (JSON)</b>", unsafe_allow_html=True)
43
  sample_checklist = '''{
44
  "required_documents": [
45
  {"type": "Driver's License", "description": "Government-issued photo ID"},
 
53
  ]
54
  }'''
55
  checklist_text = st.text_area(
56
+ "Paste or edit your checklist JSON below:",
57
  value=sample_checklist,
58
  height=220,
59
  key="doc_checklist_json"
 
241
  Here is the extracted document information and prior validation result:
242
  {json.dumps(llm_json)}
243
 
244
+ The minimum required confidence is {min_confidence}. Should this document be accepted or rejected for an application, based on all available information?
245
  Respond ONLY as: {{ "accepted": true/false, "reason": "..." }}
246
  """
247
  headers = {