Ludovicollin commited on
Commit
df040d8
·
verified ·
1 Parent(s): 190c542

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -11
main.py CHANGED
@@ -16,20 +16,11 @@ import chainlit as cl
16
  import js2py
17
  os.environ["ANTHROPIC_API_KEY"] = os.environ["ANTHROPIC_API_KEY"]
18
 
19
- js_code = """
20
- function urlActive() {
21
- return window.location;
22
- }
23
 
24
- var result = urlActive();
25
- """
26
 
27
- context = js2py.EvalJs()
28
- result = context.execute(js_code)
29
-
30
- # Print the result
31
  print(result)
32
- print(context.result)
33
 
34
 
35
  def library():
 
16
  import js2py
17
  os.environ["ANTHROPIC_API_KEY"] = os.environ["ANTHROPIC_API_KEY"]
18
 
19
+ js_code = "function urlActive() {return window.location;}"
 
 
 
20
 
21
+ result = js2py.eval_js(js_code)
 
22
 
 
 
 
 
23
  print(result)
 
24
 
25
 
26
  def library():