refactoring for pylint score

This commit is contained in:
VinciGit00 2024-02-29 10:49:25 +01:00
parent 17d1f6a47b
commit 79387d1617
2 changed files with 7 additions and 7 deletions

View File

@ -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}")
print(f"Speech file saved to: {file_path}")

View File

@ -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