From 79387d1617cc2c5d71bd650da4e2212676ea785a Mon Sep 17 00:00:00 2001 From: VinciGit00 Date: Thu, 29 Feb 2024 10:49:25 +0100 Subject: [PATCH] refactoring for pylint score --- examples/utils/vision_speech_example.py | 11 ++++++----- scrapegraphai/evaluators/trulens_evaluator.py | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/utils/vision_speech_example.py b/examples/utils/vision_speech_example.py index 21bed5ab..9c86271c 100644 --- a/examples/utils/vision_speech_example.py +++ b/examples/utils/vision_speech_example.py @@ -17,13 +17,14 @@ llm_config = { } model = OpenAIImageToText(llm_config) -answer = model.run("https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png") -print(answer) +ANSWER = model.run( + "https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png") +print(ANSWER) text_to_speech = OpenAITextToSpeech(llm_config, model="tts-1", voice="alloy") -text = "Today is a wonderful day to build something people love!" -audio = text_to_speech.run(text) +TEXT = "Today is a wonderful day to build something people love!" +audio = text_to_speech.run(TEXT) # Save the audio to a file curr_dir = os.path.dirname(os.path.realpath(__file__)) @@ -31,4 +32,4 @@ file_path = os.path.join(curr_dir, "text2speech.mp3") save_audio_from_bytes(audio, file_path) -print(f"Speech file saved to: {file_path}") \ No newline at end of file +print(f"Speech file saved to: {file_path}") diff --git a/scrapegraphai/evaluators/trulens_evaluator.py b/scrapegraphai/evaluators/trulens_evaluator.py index 9b8469ce..febe2980 100644 --- a/scrapegraphai/evaluators/trulens_evaluator.py +++ b/scrapegraphai/evaluators/trulens_evaluator.py @@ -84,5 +84,4 @@ class StandAlone(Provider): """ if '{' in my_text_field and '}' in my_text_field and ':' in my_text_field: return 1.0 - else: - return 0.0 + return 0.0