LilNoobie commited on
Commit
6bc01c6
·
verified ·
1 Parent(s): 436f648

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -3,6 +3,24 @@ import os
3
  from smolagents import CodeAgent, InferenceClientModel
4
  from Gradio_UI import GradioUI
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  # Get current directory path
7
  CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
8
 
 
3
  from smolagents import CodeAgent, InferenceClientModel
4
  from Gradio_UI import GradioUI
5
 
6
+ LANGFUSE_PUBLIC_KEY = os.environ["LANGFUSE_PUBLIC_KEY"]
7
+ LANGFUSE_SECRET_KEY = os.environ["LANGFUSE_SECRET_KEY"]
8
+ LANGFUSE_HOST = os.environ.get("LANGFUSE_HOST", "https://cloud.langfuse.com")
9
+
10
+ from langfuse import get_client
11
+
12
+ langfuse = get_client()
13
+
14
+ if langfuse.auth_check():
15
+ print("Langfuse client is authenticated and ready!")
16
+ else:
17
+ print("Authentication failed. Please check your credentials and host.")
18
+
19
+ from openinference.instrumentation.smolagents import SmolagentsInstrumentor
20
+
21
+ SmolagentsInstrumentor().instrument()
22
+
23
+
24
  # Get current directory path
25
  CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
26