ginipick commited on
Commit
eb3c9b7
Β·
verified Β·
1 Parent(s): f025afc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -9
app.py CHANGED
@@ -2,24 +2,15 @@ import streamlit as st
2
  import os
3
  import base64
4
  import types
5
-
6
- # Secretμ—μ„œ μ €μž₯된 μ½”λ“œ κ°€μ Έμ˜€κΈ°
7
  app_code = os.environ.get("APP", "")
8
-
9
- # μ½”λ“œ μ‹€ν–‰ ν•¨μˆ˜
10
  def execute_code(code_str):
11
  try:
12
- # μ‹€ν–‰ κ°€λŠ₯ν•œ μ½”λ“œλ‘œ λ³€ν™˜
13
  code_module = types.ModuleType('dynamic_code')
14
  exec(code_str, code_module.__dict__)
15
-
16
- # ν•„μš”ν•œ ν•¨μˆ˜ μ‹€ν–‰
17
  if hasattr(code_module, 'main'):
18
  code_module.main()
19
  except Exception as e:
20
  st.error(f"μ½”λ“œ μ‹€ν–‰ 쀑 였λ₯˜ λ°œμƒ: {str(e)}")
21
-
22
- # μ½”λ“œ μ‹€ν–‰
23
  if app_code:
24
  execute_code(app_code)
25
  else:
 
2
  import os
3
  import base64
4
  import types
 
 
5
  app_code = os.environ.get("APP", "")
 
 
6
  def execute_code(code_str):
7
  try:
 
8
  code_module = types.ModuleType('dynamic_code')
9
  exec(code_str, code_module.__dict__)
 
 
10
  if hasattr(code_module, 'main'):
11
  code_module.main()
12
  except Exception as e:
13
  st.error(f"μ½”λ“œ μ‹€ν–‰ 쀑 였λ₯˜ λ°œμƒ: {str(e)}")
 
 
14
  if app_code:
15
  execute_code(app_code)
16
  else: