fizzarif7 commited on
Commit
38e877d
·
verified ·
1 Parent(s): 9988a59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -146,6 +146,16 @@ def verify_document(file):
146
  # ------------------------
147
  # Streamlit UI
148
  # ------------------------
 
 
 
 
 
 
 
 
 
 
149
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
150
  gr.Markdown("## 📑 Document Authenticity Verifier")
151
  gr.Markdown("Upload a **PDF, DOCX, or Image**, OR paste raw **text** to verify authenticity.")
 
146
  # ------------------------
147
  # Streamlit UI
148
  # ------------------------
149
+ def process_input(file, manual_text):
150
+ if file is not None:
151
+ report = verify_document(file)
152
+ return report
153
+ elif manual_text.strip():
154
+ report = verify_text(manual_text, source_type="MANUAL TEXT")
155
+ return report
156
+ else:
157
+ return "❌ Please upload a document or paste text first."
158
+
159
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
160
  gr.Markdown("## 📑 Document Authenticity Verifier")
161
  gr.Markdown("Upload a **PDF, DOCX, or Image**, OR paste raw **text** to verify authenticity.")