Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ summarizer = pipeline(
|
|
36 |
"summarization",
|
37 |
model="sshleifer/distilbart-cnn-6-6"
|
38 |
)
|
39 |
-
|
40 |
def detect_objects(image):
|
41 |
image_array = np.array(image) # Μετατροπή PIL → NumPy
|
42 |
results = yolo_model(image_array)
|
@@ -96,6 +96,7 @@ def text_to_speech(story):
|
|
96 |
tts.save(audio_file_path)
|
97 |
return audio_file_path
|
98 |
|
|
|
99 |
def full_pipeline(image):
|
100 |
detected_objects = detect_objects(image)
|
101 |
story = generate_story(detected_objects)
|
|
|
36 |
"summarization",
|
37 |
model="sshleifer/distilbart-cnn-6-6"
|
38 |
)
|
39 |
+
|
40 |
def detect_objects(image):
|
41 |
image_array = np.array(image) # Μετατροπή PIL → NumPy
|
42 |
results = yolo_model(image_array)
|
|
|
96 |
tts.save(audio_file_path)
|
97 |
return audio_file_path
|
98 |
|
99 |
+
@spaces.GPU
|
100 |
def full_pipeline(image):
|
101 |
detected_objects = detect_objects(image)
|
102 |
story = generate_story(detected_objects)
|