andreinigo commited on
Commit
fbac1a8
·
1 Parent(s): f8af2f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -9,8 +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 not (isinstance(input_description, str) and
13
- re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_names) and
14
  re.match(r'^\[\s*".*"\s*(,\s*".*"\s*)*\]$', character_descriptions)):
15
  raise ValueError("Invalid input format")
16
 
 
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