SergeyO7 commited on
Commit
9dbc3d9
·
verified ·
1 Parent(s): 6421c13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -31,15 +31,18 @@ load_dotenv()
31
  # Add the alias before instrumentation
32
  smolagents.ApiModel = smolagents.HfApiModel
33
 
34
- langfuse = Langfuse(
35
- secret_key="sk-lf-f8fe856f-7569-4aec-9a08-dabbac9e83b9",
36
- public_key="pk-lf-23dd0190-7c1d-4ac9-be62-9aaf1370ef6d",
37
- host="https://cloud.langfuse.com"
38
- )
 
 
 
 
39
  LANGFUSE_AUTH=base64.b64encode(f"{LANGFUSE_PUBLIC_KEY}:{LF_SECRET_KEY}".encode()).decode()
40
 
41
  os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel" # EU data region
42
- # os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://us.cloud.langfuse.com/api/public/otel" # US data region
43
  os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
44
 
45
  trace_provider = TracerProvider()
@@ -57,7 +60,8 @@ PROMPT_TEMPLATE = """
57
  """
58
 
59
  # Global variable for status
60
- status_message = "Инициализация..."
 
61
 
62
  # Translation dictionaries
63
  classification_ru = {
 
31
  # Add the alias before instrumentation
32
  smolagents.ApiModel = smolagents.HfApiModel
33
 
34
+ LANGFUSE_PUBLIC_KEY = "pk-lf-23dd0190-7c1d-4ac9-be62-9aaf1370ef6d"
35
+ LF_SECRET_KEY = "sk-lf-f8fe856f-7569-4aec-9a08-dabbac9e83b9"
36
+
37
+ #langfuse = Langfuse(
38
+ # secret_key="sk-lf-f8fe856f-7569-4aec-9a08-dabbac9e83b9",
39
+ # public_key="pk-lf-23dd0190-7c1d-4ac9-be62-9aaf1370ef6d",
40
+ # host="https://cloud.langfuse.com"
41
+ #)
42
+
43
  LANGFUSE_AUTH=base64.b64encode(f"{LANGFUSE_PUBLIC_KEY}:{LF_SECRET_KEY}".encode()).decode()
44
 
45
  os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = "https://cloud.langfuse.com/api/public/otel" # EU data region
 
46
  os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {LANGFUSE_AUTH}"
47
 
48
  trace_provider = TracerProvider()
 
60
  """
61
 
62
  # Global variable for status
63
+ status_message =
64
+ "Инициализация..."
65
 
66
  # Translation dictionaries
67
  classification_ru = {