Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,12 +66,12 @@ import webbrowser
|
|
66 |
from streamlit.components.v1 import html
|
67 |
import streamlit.components.v1 as components
|
68 |
from PyPDF2 import PdfReader
|
69 |
-
|
70 |
import io
|
71 |
from huggingface_hub import Repository
|
72 |
from git import repo
|
73 |
|
74 |
-
|
75 |
#device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
76 |
|
77 |
# from git import Repo
|
@@ -496,6 +496,13 @@ def main():
|
|
496 |
# Write the JSON data to a file
|
497 |
with open(json_file, "w") as f:
|
498 |
f.write(json_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
|
500 |
def convert_df(df):
|
501 |
|
|
|
66 |
from streamlit.components.v1 import html
|
67 |
import streamlit.components.v1 as components
|
68 |
from PyPDF2 import PdfReader
|
69 |
+
from huggingface_hub import HfApi
|
70 |
import io
|
71 |
from huggingface_hub import Repository
|
72 |
from git import repo
|
73 |
|
74 |
+
api = HfApi()
|
75 |
#device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
76 |
|
77 |
# from git import Repo
|
|
|
496 |
# Write the JSON data to a file
|
497 |
with open(json_file, "w") as f:
|
498 |
f.write(json_data)
|
499 |
+
upload_file(
|
500 |
+
path_or_fileobj=f,
|
501 |
+
path_in_repo="ch.json",
|
502 |
+
repo_id="Seetha/IMA-pipeline-streamlit",
|
503 |
+
repo_type="datasets",
|
504 |
+
token="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",
|
505 |
+
)
|
506 |
|
507 |
def convert_df(df):
|
508 |
|