mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-23 21:00:30 +08:00
refactoring for pylint score
This commit is contained in:
parent
17d1f6a47b
commit
79387d1617
@ -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}")
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user