Skip to content

Commit 28f0c9b

Browse files
Hugo Cordoba LealHugo Cordoba Leal
authored andcommitted
[FIX] code_review
1 parent c0f98a8 commit 28f0c9b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

API-Samples/Python/VideoIndexerClient/VideoIndexerClient.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def get_player_widget_url_async(self, video_id:str) -> None:
399399
url = response.url
400400
print(f'Got the player widget URL: {url}')
401401

402-
def get_textual_summary(self, video_id:str, deployment_name:str, lenght:str, style:str, timeout_sec:Optional[int]=None) -> None:
402+
def get_textual_summary(self, video_id:str, deployment_name:str, lenght:str, style:str, timeout_sec:Optional[int]=None) -> Optional[dict]:
403403
'''
404404
Calls the TextualSummarization API. First a call is made with the POST method, to create the video summary:
405405
(https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Create-Video-Summary)
@@ -408,8 +408,8 @@ def get_textual_summary(self, video_id:str, deployment_name:str, lenght:str, sty
408408
409409
:param video_id: The video ID
410410
:param deploymentName: The name of the deployment
411-
:param length: The length of the summary
412-
:param style: The style of the summary
411+
:param length: The length of the summary. Allowed values: Medium / Short / Long
412+
:param style: The style of the summary. Allowed values: Neutral / Casual / Formal
413413
'''
414414

415415
self.get_account_async() # if account is not initialized, get it
@@ -453,8 +453,8 @@ def get_textual_summary(self, video_id:str, deployment_name:str, lenght:str, sty
453453
print(f"Error getting video summary status: {e}")
454454
return
455455
if video_state == 'Processed':
456-
print(f'Here is the textual summary of the video: \n{video_result}')
457-
break
456+
print('Here is the textual summary of the video: \n')
457+
return video_result
458458
elif video_state == 'Failed':
459459
print(f"Text summary failed for video ID {video_id}.")
460460
break

0 commit comments

Comments
 (0)