Spaces:
Runtime error
Runtime error
Commit
·
73eabb5
1
Parent(s):
f2afde8
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def show_predicted_caption(image, top_k=1):
|
|
64 |
matches = predict_caption(
|
65 |
image, model, text_embeddings, testing_df["caption"]
|
66 |
)[:top_k]
|
67 |
-
return matches
|
68 |
|
69 |
def generate_radiology_report(prompt):
|
70 |
response = openai.Completion.create(
|
|
|
64 |
matches = predict_caption(
|
65 |
image, model, text_embeddings, testing_df["caption"]
|
66 |
)[:top_k]
|
67 |
+
return matches[0].split('(')[0].strip() # Remove the reference string from the caption
|
68 |
|
69 |
def generate_radiology_report(prompt):
|
70 |
response = openai.Completion.create(
|