Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,10 @@ def generate_reaction_steps(reactants, products):
|
|
46 |
# Extract the JSON content from the response
|
47 |
try:
|
48 |
# Parsing the raw response to extract the JSON text
|
49 |
-
content = response
|
|
|
|
|
|
|
50 |
|
51 |
# Loading the JSON string to a Python dictionary
|
52 |
steps = json.loads(content)
|
|
|
46 |
# Extract the JSON content from the response
|
47 |
try:
|
48 |
# Parsing the raw response to extract the JSON text
|
49 |
+
content = response["candidates"][0]["content"]["parts"][0].text
|
50 |
+
print(response)
|
51 |
+
print("\n\n\n")
|
52 |
+
print(content)
|
53 |
|
54 |
# Loading the JSON string to a Python dictionary
|
55 |
steps = json.loads(content)
|