AlineIoste commited on
Commit
8c92945
verified
1 Parent(s): c515a76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -35,12 +35,13 @@ if os.path.exists(output_path):
35
  else:
36
  st.write("Failed to download the file.")
37
 
38
- # Adicionar o diret贸rio atual ao sys.path
39
- sys.path.append(current_dir)
40
-
41
- # Importar o m贸dulo SynapseControl
 
42
  try:
43
- import SynapseControl
44
  st.write("SynapseControl module loaded successfully.")
45
 
46
  # Verificar a exist锚ncia das fun莽玫es
@@ -55,6 +56,4 @@ except Exception as e:
55
 
56
  # Continue com o restante da l贸gica do seu aplicativo Streamlit
57
 
58
- import keys as key
59
-
60
- st.title("Neurocognitive Structures")
 
35
  else:
36
  st.write("Failed to download the file.")
37
 
38
+ # Carregar o m贸dulo SynapseControl usando importlib.util
39
+ module_name = "SynapseControl"
40
+ spec = importlib.util.spec_from_file_location(module_name, output_path)
41
+ SynapseControl = importlib.util.module_from_spec(spec)
42
+ sys.modules[module_name] = SynapseControl
43
  try:
44
+ spec.loader.exec_module(SynapseControl)
45
  st.write("SynapseControl module loaded successfully.")
46
 
47
  # Verificar a exist锚ncia das fun莽玫es
 
56
 
57
  # Continue com o restante da l贸gica do seu aplicativo Streamlit
58
 
59
+ import keys as key