Skip to content

Python scraper based on AI

refactoring for pylint score

VinciGit0079387d1617cc
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