api_first_attempt / HfApi_testing.Rmd
aoiferyan's picture
Upload folder using huggingface_hub
9660f83 verified
raw
history blame contribute delete
No virus
660 Bytes
---
title: "hfhub_testing"
output: html_document
date: "2024-04-04"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
hf <- reticulate::import("huggingface_hub")
api <- hf$HfApi()
api$create_repo(repo_id="aoiferyan/api_first_attempt", repo_type="space", space_sdk="gradio")
api$upload_folder(repo_id="aoiferyan/api_first_attempt", repo_type="space", folder_path="/Users/aoiferyan/Library/CloudStorage/GoogleDrive-aoife.ryan@sharecreative.com/My Drive/Big Think/bigThink_5Apr2024")
api$delete_space_storage(repo_id="aoiferyan/api_first_attempt")
api$request_space_hardware(repo_id=repo_id, hardware=SpaceHardware.T4_MEDIUM)
```