Update app.py
Browse files
app.py
CHANGED
|
@@ -4,36 +4,36 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
-
|
| 8 |
-
from langfuse import Langfuse, get_client
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
os.environ["LANGFUSE_PUBLIC_KEY"] = os.getenv("LF_Public")
|
| 12 |
-
os.environ["LANGFUSE_SECRET_KEY"] = os.getenv("LF_Secret")
|
| 13 |
-
os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # 🇪🇺 EU region
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
os.environ["HF_TOKEN"] = os.getenv("HF_Token")
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
print(os.getenv('LF_Secret'))
|
| 21 |
-
|
| 22 |
-
langfuse = Langfuse(
|
| 23 |
-
secret_key=os.getenv("LF_Secret"),
|
| 24 |
-
public_key=os.getenv("LF_Public"),
|
| 25 |
-
host="https://cloud.langfuse.com"
|
| 26 |
-
)
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
if langfuse.auth_check():
|
| 30 |
-
print("Langfuse client is authenticated and ready!")
|
| 31 |
-
else:
|
| 32 |
-
print("Authentication failed. Please check your credentials and host.")
|
| 33 |
-
|
| 34 |
-
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 35 |
-
|
| 36 |
-
SmolagentsInstrumentor().instrument()
|
| 37 |
|
| 38 |
# Importing the Agent stuff
|
| 39 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, PromptTemplates, EMPTY_PROMPT_TEMPLATES
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
+
## Setting up Langfuse for telemetry
|
| 8 |
+
#from langfuse import Langfuse, get_client
|
| 9 |
+
#
|
| 10 |
+
## -- Get keys for your project from the project settings page: https://cloud.langfuse.com
|
| 11 |
+
#os.environ["LANGFUSE_PUBLIC_KEY"] = os.getenv("LF_Public")
|
| 12 |
+
#os.environ["LANGFUSE_SECRET_KEY"] = os.getenv("LF_Secret")
|
| 13 |
+
#os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com" # 🇪🇺 EU region
|
| 14 |
+
#
|
| 15 |
+
## your Hugging Face token
|
| 16 |
+
#os.environ["HF_TOKEN"] = os.getenv("HF_Token")
|
| 17 |
+
#
|
| 18 |
+
##langfuse = get_client()
|
| 19 |
+
#
|
| 20 |
+
#print(os.getenv('LF_Secret'))
|
| 21 |
+
#
|
| 22 |
+
#langfuse = Langfuse(
|
| 23 |
+
# secret_key=os.getenv("LF_Secret"),
|
| 24 |
+
# public_key=os.getenv("LF_Public"),
|
| 25 |
+
# host="https://cloud.langfuse.com"
|
| 26 |
+
#)
|
| 27 |
+
#
|
| 28 |
+
## -- Verify connection
|
| 29 |
+
#if langfuse.auth_check():
|
| 30 |
+
# print("Langfuse client is authenticated and ready!")
|
| 31 |
+
#else:
|
| 32 |
+
# print("Authentication failed. Please check your credentials and host.")
|
| 33 |
+
#
|
| 34 |
+
#from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 35 |
+
#
|
| 36 |
+
#SmolagentsInstrumentor().instrument()
|
| 37 |
|
| 38 |
# Importing the Agent stuff
|
| 39 |
from smolagents import CodeAgent,DuckDuckGoSearchTool, InferenceClientModel, PromptTemplates, EMPTY_PROMPT_TEMPLATES
|