Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -99,6 +99,9 @@ def get_run_steps(client, thread, run):
|
|
99 |
|
100 |
return run_steps
|
101 |
|
|
|
|
|
|
|
102 |
def get_run_step_details(run_steps):
|
103 |
for step in run_steps.data:
|
104 |
step_details = step.step_details
|
@@ -125,7 +128,9 @@ def get_run_step_details(run_steps):
|
|
125 |
file = client.files.retrieve(file_id)
|
126 |
print(file)
|
127 |
content = client.files.content(file_id)
|
128 |
-
|
|
|
|
|
129 |
return content
|
130 |
|
131 |
def get_messages(client, thread):
|
|
|
99 |
|
100 |
return run_steps
|
101 |
|
102 |
+
def generate_markdown_image(image_data: str) -> str:
|
103 |
+
return f"![Image](data:image/png;base64,{image_data})"
|
104 |
+
|
105 |
def get_run_step_details(run_steps):
|
106 |
for step in run_steps.data:
|
107 |
step_details = step.step_details
|
|
|
128 |
file = client.files.retrieve(file_id)
|
129 |
print(file)
|
130 |
content = client.files.content(file_id)
|
131 |
+
img = generate_markdown_image(content)
|
132 |
+
print("\n\n")
|
133 |
+
print(img)
|
134 |
return content
|
135 |
|
136 |
def get_messages(client, thread):
|