This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from openai import OpenAI | |
| import base64 | |
| API_KEY="sk-YOUR-KEY" | |
| client = OpenAI(api_key=API_KEY) | |
| response = client.videos.create( | |
| model="sora-2-pro", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from difflib import SequenceMatcher | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| # Blacklist phrases we don't want | |
| blacklisted_answers = ["I'm not sure", "I'm sorry,", "I'm not a "] | |
| def similar(first_string, second_string): | |
| """ | |
| Checks how similar two strings are | |