fargerm commited on
Commit
e8bd320
1 Parent(s): 3ace78a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -31,7 +31,7 @@ def generate_game_environment(environment_description):
31
  ]
32
  )
33
 
34
- return message['content'] # Return the relevant content
35
 
36
  def generate_game_story(environment, protagonist, antagonist):
37
  client = anthropic.Anthropic(api_key=API_KEY)
@@ -57,7 +57,7 @@ def generate_game_story(environment, protagonist, antagonist):
57
  ]
58
  )
59
 
60
- return message['content'] # Return the relevant content
61
 
62
  def generate_protagonist(protagonist_description):
63
  client = anthropic.Anthropic(api_key=API_KEY)
@@ -80,7 +80,7 @@ def generate_protagonist(protagonist_description):
80
  ]
81
  )
82
 
83
- return message['content'] # Return the relevant content
84
 
85
  def generate_antagonist(antagonist_description):
86
  client = anthropic.Anthropic(api_key=API_KEY)
@@ -103,7 +103,7 @@ def generate_antagonist(antagonist_description):
103
  ]
104
  )
105
 
106
- return message['content'] # Return the relevant content
107
 
108
  # Sidebar Inputs
109
  st.sidebar.title("StoryForge Input")
 
31
  ]
32
  )
33
 
34
+ return message.content[0].text # Return the relevant content
35
 
36
  def generate_game_story(environment, protagonist, antagonist):
37
  client = anthropic.Anthropic(api_key=API_KEY)
 
57
  ]
58
  )
59
 
60
+ return message.content[0].text # Return the relevant content
61
 
62
  def generate_protagonist(protagonist_description):
63
  client = anthropic.Anthropic(api_key=API_KEY)
 
80
  ]
81
  )
82
 
83
+ return message.content[0].text # Return the relevant content
84
 
85
  def generate_antagonist(antagonist_description):
86
  client = anthropic.Anthropic(api_key=API_KEY)
 
103
  ]
104
  )
105
 
106
+ return message.content[0].text # Return the relevant content
107
 
108
  # Sidebar Inputs
109
  st.sidebar.title("StoryForge Input")