Update app.py
Browse files1234514 unmodified lines20212223242526272829303132333435363738394041424344import pandas_profiling as ppfrom huggingface_hub.hf_api import create_repofrom huggingface_hub.repository import Repositoryimport gradio as grimport pandas as pd14 unmodified linesrepo_url = create_repo(f"{username}/{dataset_name}", repo_type = "space", token = token, space_sdk = "static")subprocess.run(f"git clone {repo_url}".split(),encoding="utf-8",cwd= os.getcwd(),check=True,env=os.environ.copy(),)repo = Repository(clone_from = repo_url,local_dir=f"{username}/{dataset_name}",git_user = "merve",git_email = "merve@huggingface.co",)profile.to_file(f"{username}/{dataset_name}/index.html")repo.git_add()repo.git_commit(commit_message = "Dataset report")repo.git_push()return f"Your dataset report will be ready at {repo_url}"gr.Interface(profile_dataset, inputs = [dataset, username, token, dataset_name], outputs=[output_text], enable_queue = True).launch(debug=True)1234514 unmodified lines202122232425262728293031import pandas_profiling as ppfrom huggingface_hub.hf_api import create_repo, upload_filefrom huggingface_hub.repository import Repositoryimport gradio as grimport pandas as pd14 unmodified linesrepo_url = create_repo(f"{username}/{dataset_name}", repo_type = "space", token = token, space_sdk = "static")profile.to_file(f"{username}/{dataset_name}/index.html")upload_file(path_or_fileobj =f"{username}/{dataset_name}/index.html", repo_id =f"{username}/{dataset_name}", repo_type = "space", token=token)return f"Your dataset report will be ready at {repo_url}"gr.Interface(profile_dataset, inputs = [dataset, username, token, dataset_name], outputs=[output_text], enable_queue = True).launch(debug=True)
app.py+5-18