Spaces:
Running
Running
button click
Browse files
app.py
CHANGED
@@ -39,18 +39,23 @@ def extract_data(feed):
|
|
39 |
data.append(p.extract_text())
|
40 |
return None
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
|
56 |
|
|
|
39 |
data.append(p.extract_text())
|
40 |
return None
|
41 |
|
42 |
+
|
43 |
+
|
44 |
+
# if data is not None:
|
45 |
+
# st.caption(data)
|
46 |
+
# ai_ppt(data=data)
|
47 |
+
|
48 |
+
def main():
|
49 |
+
uploaded_file = st.file_uploader('Choose your .pdf file', type="pdf")
|
50 |
+
if uploaded_file is not None:
|
51 |
+
extract_data(uploaded_file)
|
52 |
+
if st.button("Search"):
|
53 |
+
ai_ppt(data)
|
54 |
+
|
55 |
+
if __name__ == '__main__':
|
56 |
+
import asyncio
|
57 |
+
nest_asyncio.apply()
|
58 |
+
asyncio.run(main())
|
59 |
|
60 |
|
61 |
|