Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,9 @@ from Gradio_UI import GradioUI
|
|
10 |
import os
|
11 |
import base64
|
12 |
|
|
|
|
|
|
|
13 |
LANGFUSE_PUBLIC_KEY="pk-lf-133099c7-8644-49e8-8f6e-ec8bd6d543fd"
|
14 |
LF_SECRET_KEY = os.environ["LANGFUSE_SECRET_KEY"]
|
15 |
LANGFUSE_AUTH=base64.b64encode(f"{LANGFUSE_PUBLIC_KEY}:{LF_SECRET_KEY}".encode()).decode()
|
@@ -23,7 +26,8 @@ from opentelemetry.sdk.trace import TracerProvider
|
|
23 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
24 |
|
25 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
26 |
-
from opentelemetry.sdk.trace.export
|
|
|
27 |
|
28 |
trace_provider = TracerProvider()
|
29 |
trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter()))
|
|
|
10 |
import os
|
11 |
import base64
|
12 |
|
13 |
+
# Add the alias before instrumentation
|
14 |
+
smolagents.ApiModel = smolagents.HfApiModel
|
15 |
+
|
16 |
LANGFUSE_PUBLIC_KEY="pk-lf-133099c7-8644-49e8-8f6e-ec8bd6d543fd"
|
17 |
LF_SECRET_KEY = os.environ["LANGFUSE_SECRET_KEY"]
|
18 |
LANGFUSE_AUTH=base64.b64encode(f"{LANGFUSE_PUBLIC_KEY}:{LF_SECRET_KEY}".encode()).decode()
|
|
|
26 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
27 |
|
28 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
29 |
+
from opentelemetry.sdk.trace.export
|
30 |
+
import SimpleSpanProcessor
|
31 |
|
32 |
trace_provider = TracerProvider()
|
33 |
trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter()))
|