Update app.py
Browse files
app.py
CHANGED
@@ -83,16 +83,7 @@ async def upload_certificate_to_hub(username: str, certificate_img) -> str:
|
|
83 |
|
84 |
try:
|
85 |
# Run upload in a thread pool since upload_file is blocking
|
86 |
-
|
87 |
-
upload_func = partial(
|
88 |
-
upload_file,
|
89 |
-
path_or_fileobj=tmp.name,
|
90 |
-
path_in_repo=f"certificates/{username}/{date.today()}.png",
|
91 |
-
repo_id="agents-course/final-certificates",
|
92 |
-
repo_type="dataset",
|
93 |
-
token=os.getenv("HF_TOKEN"),
|
94 |
-
)
|
95 |
-
await loop.run_in_executor(None, upload_func)
|
96 |
|
97 |
# Construct the URL to the image
|
98 |
cert_url = (
|
|
|
83 |
|
84 |
try:
|
85 |
# Run upload in a thread pool since upload_file is blocking
|
86 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
# Construct the URL to the image
|
89 |
cert_url = (
|