LovnishVerma commited on
Commit
9991454
·
verified ·
1 Parent(s): 43fad5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ REPO_TYPE = "space" # Set to 'space' for Streamlit projects
24
 
25
  # Ensure repository exists
26
  try:
27
- api.create_repo(repo_id=REPO_ID, repo_type=REPO_TYPE, token=hf_token, exist_ok=True)
 
28
  st.success(f"Repository '{REPO_NAME}' is ready on Hugging Face!")
29
  except Exception as e:
30
  st.error(f"Error creating repository: {e}")
 
24
 
25
  # Ensure repository exists
26
  try:
27
+ # Specify space_sdk as 'streamlit' for a Streamlit-based Hugging Face Space
28
+ api.create_repo(repo_id=REPO_ID, repo_type=REPO_TYPE, space_sdk="streamlit", token=hf_token, exist_ok=True)
29
  st.success(f"Repository '{REPO_NAME}' is ready on Hugging Face!")
30
  except Exception as e:
31
  st.error(f"Error creating repository: {e}")