---
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()

repo_id <- "aoiferyan/api_second_attempt"
api$create_repo(repo_id = repo_id, repo_type="space", space_sdk="gradio")

api$upload_folder(repo_id = repo_id, repo_type="space", folder_path="/Users/aoiferyan/Library/CloudStorage/GoogleDrive-aoife.ryan@sharecreative.com/My Drive/Big Think/bigThink_5Apr2024/HfApi_testing")

space_hardware <- hf$SpaceHardware

api$request_space_hardware(repo_id = repo_id, hardware = space_hardware$CPU_BASIC)

api$delete_file(repo_id = repo_id, path_in_repo = "HfApi_testing.Rmd")
```


