myyim commited on
Commit
b096ccc
·
verified ·
1 Parent(s): a912b78

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +6 -3
src/app.py CHANGED
@@ -1,10 +1,13 @@
1
  import streamlit as st
2
- import os
3
- import types
4
- import requests
5
 
6
  # Retrieve your hidden script from the environment variable
7
  app_url = os.environ.get("APP_URL", "")
 
 
 
 
8
 
9
  def execute_remote_script(url: str): # code_str: str
10
  """
 
1
  import streamlit as st
2
+ import os,types,requests
3
+ from huggingface_hub import login
 
4
 
5
  # Retrieve your hidden script from the environment variable
6
  app_url = os.environ.get("APP_URL", "")
7
+ token = os.environ.get("HF_TOKEN", "")
8
+
9
+ # Pass the token as a string
10
+ login(token=token)
11
 
12
  def execute_remote_script(url: str): # code_str: str
13
  """