Skip to content

Commit 79387d1

Browse files
committed
refactoring for pylint score
1 parent 17d1f6a commit 79387d1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/utils/vision_speech_example.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@
1717
}
1818

1919
model = OpenAIImageToText(llm_config)
20-
answer = model.run("https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png")
21-
print(answer)
20+
ANSWER = model.run(
21+
"https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png")
22+
print(ANSWER)
2223

2324
text_to_speech = OpenAITextToSpeech(llm_config, model="tts-1", voice="alloy")
2425

25-
text = "Today is a wonderful day to build something people love!"
26-
audio = text_to_speech.run(text)
26+
TEXT = "Today is a wonderful day to build something people love!"
27+
audio = text_to_speech.run(TEXT)
2728

2829
# Save the audio to a file
2930
curr_dir = os.path.dirname(os.path.realpath(__file__))
3031
file_path = os.path.join(curr_dir, "text2speech.mp3")
3132

3233
save_audio_from_bytes(audio, file_path)
3334

34-
print(f"Speech file saved to: {file_path}")
35+
print(f"Speech file saved to: {file_path}")

scrapegraphai/evaluators/trulens_evaluator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,4 @@ def json_complaint(self, my_text_field: str) -> float:
8484
"""
8585
if '{' in my_text_field and '}' in my_text_field and ':' in my_text_field:
8686
return 1.0
87-
else:
88-
return 0.0
87+
return 0.0

0 commit comments

Comments
 (0)