myyim commited on
Commit
f05c097
·
verified ·
1 Parent(s): 09b86d5

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +2 -3
src/app.py CHANGED
@@ -8,7 +8,6 @@ token = os.environ.get("HF_TOKEN", "")
8
 
9
  # Pass the token as a string
10
  login(token=token)
11
- st.write(app_url)
12
 
13
  def execute_remote_script(url: str): # code_str: str
14
  """
@@ -20,8 +19,7 @@ def execute_remote_script(url: str): # code_str: str
20
 
21
  # Send a GET request to the URL
22
  response = requests.get(url,headers=headers)
23
- st.write(response)
24
- response.raise_for_status() # Raises an HTTPError for bad responses
25
 
26
  # Get the script content as a string
27
  code_string = response.text
@@ -29,6 +27,7 @@ def execute_remote_script(url: str): # code_str: str
29
 
30
  # Create a fresh module namespace to execute the code in
31
  dynamic_module = types.ModuleType("dynamic_module")
 
32
 
33
  # Execute the code string in the new namespace
34
  exec(code_string, dynamic_module.__dict__)
 
8
 
9
  # Pass the token as a string
10
  login(token=token)
 
11
 
12
  def execute_remote_script(url: str): # code_str: str
13
  """
 
19
 
20
  # Send a GET request to the URL
21
  response = requests.get(url,headers=headers)
22
+ # response.raise_for_status() # Raises an HTTPError for bad responses
 
23
 
24
  # Get the script content as a string
25
  code_string = response.text
 
27
 
28
  # Create a fresh module namespace to execute the code in
29
  dynamic_module = types.ModuleType("dynamic_module")
30
+ st.write(dynamic_module)
31
 
32
  # Execute the code string in the new namespace
33
  exec(code_string, dynamic_module.__dict__)