Spaces:
Sleeping
Sleeping
Commit
·
92a06a4
1
Parent(s):
fbac1a8
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
9 |
#A function to generate scenes of a movie, given a description of the movie, and the characters of the movie.
|
10 |
def generate_scenes(input_description, character_names , character_descriptions):
|
11 |
# Check if input arguments are in the correct format
|
12 |
-
if re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_names) and
|
13 |
re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_descriptions)):
|
14 |
raise ValueError("Invalid input format")
|
15 |
|
|
|
9 |
#A function to generate scenes of a movie, given a description of the movie, and the characters of the movie.
|
10 |
def generate_scenes(input_description, character_names , character_descriptions):
|
11 |
# Check if input arguments are in the correct format
|
12 |
+
if (re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_names) and
|
13 |
re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_descriptions)):
|
14 |
raise ValueError("Invalid input format")
|
15 |
|