Spaces:
Sleeping
Sleeping
import streamlit as st | |
import pandas as pd | |
import numpy as np | |
import os | |
import grobidmonkey | |
def save_uploaded_file(uploaded_file): | |
file_path = os.path.join("uploads", uploaded_file.name) | |
with open(file_path, "wb") as f: | |
f.write(uploaded_file.getbuffer()) | |
return file_path # Return the file path as a string | |
st.title('Paper2Slides') | |
st.subheader('Upload paper in pdf format') | |
uploaded_file = st.file_uploader("Choose a file") | |
if uploaded_file is not None: | |
st.write(uploaded_file.name) | |
bytes_data = uploaded_file.getvalue() | |
st.write(len(bytes_data), "bytes") | |
saved_file_path = save_uploaded_file(uploaded_file) | |