Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from rag_pipeline import process_pdf
|
| 3 |
+
|
| 4 |
+
st.title("🧾 Prescription Extractor (RAG)")
|
| 5 |
+
pdf_file = st.file_uploader("Upload a prescription PDF", type=["pdf"])
|
| 6 |
+
|
| 7 |
+
if pdf_file:
|
| 8 |
+
with st.spinner("Processing..."):
|
| 9 |
+
extracted_data = process_pdf(pdf_file)
|
| 10 |
+
st.success("Extraction complete!")
|
| 11 |
+
st.json(extracted_data)
|