merve HF staff commited on
Commit
177d46a
·
1 Parent(s): 2b26c1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -25,11 +25,21 @@ def profile_dataset(dataset, username, token, dataset_name):
25
 
26
  profile.to_file("./index.html")
27
  upload_file(path_or_fileobj ="./index.html", path_in_repo = "index.html", repo_id =f"{username}/{dataset_name}", repo_type = "space", token=token)
28
- readme = f"---\ntitle: {dataset_name}\nemoji: ✨\ncolorFrom: green\ncolorTo: red\nsdk: static\n\npinned: false\ntags:\n- dataset report\n---"
 
 
 
 
 
 
 
 
 
 
29
  with open("README.md", "w+") as f:
30
  f.write(readme)
31
  upload_file(path_or_fileobj ="./README.md", path_in_repo = "README.md", repo_id =f"{username}/{dataset_name}", repo_type = "space", token=token)
32
 
33
  return f"Your dataset report will be ready at {repo_url}"
34
 
35
- gr.Interface(profile_dataset, title = title, description = description, inputs = [dataset, username, token, dataset_name], outputs=[output_text], enable_queue = True, examples = ["auto-mpg.csv", "username", "token", "autompg"]).launch(debug=True)
 
25
 
26
  profile.to_file("./index.html")
27
  upload_file(path_or_fileobj ="./index.html", path_in_repo = "index.html", repo_id =f"{username}/{dataset_name}", repo_type = "space", token=token)
28
+ readme = f"---
29
+ title: {dataset_name}
30
+ emoji: ✨
31
+ colorFrom: green
32
+ colorTo: red
33
+ sdk: static
34
+
35
+ pinned: false
36
+ tags:
37
+ - dataset report
38
+ ---"
39
  with open("README.md", "w+") as f:
40
  f.write(readme)
41
  upload_file(path_or_fileobj ="./README.md", path_in_repo = "README.md", repo_id =f"{username}/{dataset_name}", repo_type = "space", token=token)
42
 
43
  return f"Your dataset report will be ready at {repo_url}"
44
 
45
+ gr.Interface(profile_dataset, title = title, description = description, inputs = [dataset, username, token, dataset_name], outputs=[output_text], enable_queue = True, examples = [["auto-mpg.csv", "username", "token", "autompg"]]).launch(debug=True)