burtenshaw
commited on
Commit
·
c4891da
1
Parent(s):
4514898
use certificates on reasoning course
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ COURSE_URL = os.getenv("COURSE_URL", "https://huggingface.co/agents-course")
|
|
| 28 |
|
| 29 |
ds = load_dataset(EXAM_DATASET_ID, split="train")
|
| 30 |
|
| 31 |
-
DATASET_REPO_URL = "https://huggingface.co/datasets/
|
| 32 |
|
| 33 |
# Convert dataset to a list of dicts and randomly sort
|
| 34 |
quiz_data = ds.to_pandas().to_dict("records")
|
|
@@ -146,7 +146,7 @@ async def upload_certificate_to_hub(username: str, certificate_img) -> str:
|
|
| 146 |
upload_file,
|
| 147 |
path_or_fileobj=tmp.name,
|
| 148 |
path_in_repo=f"certificates/{username}/{date.today()}.png",
|
| 149 |
-
repo_id="
|
| 150 |
repo_type="dataset",
|
| 151 |
token=os.getenv("HF_TOKEN"),
|
| 152 |
)
|
|
@@ -154,7 +154,7 @@ async def upload_certificate_to_hub(username: str, certificate_img) -> str:
|
|
| 154 |
|
| 155 |
# Construct the URL to the image
|
| 156 |
cert_url = (
|
| 157 |
-
f"https://huggingface.co/datasets/
|
| 158 |
f"resolve/main/certificates/{username}/{date.today()}.png"
|
| 159 |
)
|
| 160 |
|
|
|
|
| 28 |
|
| 29 |
ds = load_dataset(EXAM_DATASET_ID, split="train")
|
| 30 |
|
| 31 |
+
DATASET_REPO_URL = "https://huggingface.co/datasets/reaoning-course/certificates"
|
| 32 |
|
| 33 |
# Convert dataset to a list of dicts and randomly sort
|
| 34 |
quiz_data = ds.to_pandas().to_dict("records")
|
|
|
|
| 146 |
upload_file,
|
| 147 |
path_or_fileobj=tmp.name,
|
| 148 |
path_in_repo=f"certificates/{username}/{date.today()}.png",
|
| 149 |
+
repo_id="reaoning-course/certificates",
|
| 150 |
repo_type="dataset",
|
| 151 |
token=os.getenv("HF_TOKEN"),
|
| 152 |
)
|
|
|
|
| 154 |
|
| 155 |
# Construct the URL to the image
|
| 156 |
cert_url = (
|
| 157 |
+
f"https://huggingface.co/datasets/reaoning-course/certificates/"
|
| 158 |
f"resolve/main/certificates/{username}/{date.today()}.png"
|
| 159 |
)
|
| 160 |
|