Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,14 +26,7 @@ The output should be in JSON format with the following structure:
|
|
26 |
# Define the model with the system instruction (pre_prompt)
|
27 |
model = genai.GenerativeModel(
|
28 |
model_name="gemini-1.5-flash",
|
29 |
-
system_instruction=pre_prompt
|
30 |
-
generation_config={
|
31 |
-
"temperature": 1,
|
32 |
-
"top_p": 0.95,
|
33 |
-
"top_k": 64,
|
34 |
-
"max_output_tokens": 8192,
|
35 |
-
"response_mime_type": "text/plain",
|
36 |
-
},
|
37 |
)
|
38 |
|
39 |
# Function to generate steps for A -> D flow
|
@@ -46,7 +39,7 @@ 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 |
print(response)
|
51 |
print("\n\n\n")
|
52 |
print(content)
|
|
|
26 |
# Define the model with the system instruction (pre_prompt)
|
27 |
model = genai.GenerativeModel(
|
28 |
model_name="gemini-1.5-flash",
|
29 |
+
system_instruction=pre_prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
)
|
31 |
|
32 |
# Function to generate steps for A -> D flow
|
|
|
39 |
# Extract the JSON content from the response
|
40 |
try:
|
41 |
# Parsing the raw response to extract the JSON text
|
42 |
+
content = response.text
|
43 |
print(response)
|
44 |
print("\n\n\n")
|
45 |
print(content)
|