From e9562598d54d0ef482944977e6ecffeddd88d20c Mon Sep 17 00:00:00 2001 From: FacerAin Date: Fri, 13 Oct 2023 19:13:08 +0900 Subject: [PATCH] chore: update app.py --- app/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/app.py b/app/app.py index d76704e..a33db9d 100644 --- a/app/app.py +++ b/app/app.py @@ -54,13 +54,13 @@ def get_docs(pages): st.title("KHUMON DEMO") with st.sidebar: - input_format = st.radio("Input Format",["PDF", "VIDEO"]) + mode = st.radio("Input Format",["PDF", "VIDEO"]) -if input_format == 'PDF': +if mode == 'PDF': is_ocr = st.toggle('Extract images from pdf') source = st.file_uploader("강의 PDF를 업로드해주세요!", type="pdf", label_visibility="collapsed") -elif input_format =="VIDEO": +elif mode =="VIDEO": source = st.file_uploader("강의 비디오(MP4)를 업로드해주세요!", type="mp4", label_visibility="collapsed") @@ -68,9 +68,9 @@ def get_docs(pages): if st.button("Make! ✈️"): try: with st.spinner("분석 중 🏃"): - if input_format == 'PDF': + if mode == 'PDF': docs = process_pdf(source) - elif input_format == 'VIDEO': + elif mode == 'VIDEO': docs = process_mp4(source) llm = ChatOpenAI(temperature=0)