Spaces:
Runtime error
Runtime error
thlinhares
commited on
Commit
•
978e417
1
Parent(s):
19e5a99
teste
Browse files
app.py
CHANGED
@@ -38,17 +38,20 @@ def main():
|
|
38 |
).to(device)
|
39 |
|
40 |
# step 3: Fetch the images
|
41 |
-
print(f"Download image
|
42 |
image_path = "https://upload.wikimedia.org/wikipedia/commons/3/3b/Pleural_effusion-Metastatic_breast_carcinoma_Case_166_%285477628658%29.jpg"
|
43 |
images = [download_image(image_path)]
|
44 |
|
45 |
# step 4: Generate the Findings section
|
|
|
46 |
for anatomy in anatomies:
|
47 |
prompt = f'Describe "{anatomy}"'
|
48 |
response = generate(images, prompt, processor, model, device, dtype, generation_config)
|
49 |
print(f"Generating the Findings for [{anatomy}]:")
|
50 |
print(response)
|
51 |
|
|
|
|
|
52 |
|
53 |
if __name__ == '__main__':
|
54 |
print(f"Start the Findings")
|
|
|
38 |
).to(device)
|
39 |
|
40 |
# step 3: Fetch the images
|
41 |
+
print(f"Download image...")
|
42 |
image_path = "https://upload.wikimedia.org/wikipedia/commons/3/3b/Pleural_effusion-Metastatic_breast_carcinoma_Case_166_%285477628658%29.jpg"
|
43 |
images = [download_image(image_path)]
|
44 |
|
45 |
# step 4: Generate the Findings section
|
46 |
+
print(f"Analise image...")
|
47 |
for anatomy in anatomies:
|
48 |
prompt = f'Describe "{anatomy}"'
|
49 |
response = generate(images, prompt, processor, model, device, dtype, generation_config)
|
50 |
print(f"Generating the Findings for [{anatomy}]:")
|
51 |
print(response)
|
52 |
|
53 |
+
print(f"FIM !!")
|
54 |
+
|
55 |
|
56 |
if __name__ == '__main__':
|
57 |
print(f"Start the Findings")
|