Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -254,7 +254,7 @@ def generate_data_insights(user_input, exoplanet_data, max_tokens=500, temperatu
|
|
254 |
return data_insights
|
255 |
|
256 |
|
257 |
-
def export_to_word(response_content, subdomain_definition, science_goal):
|
258 |
doc = Document()
|
259 |
|
260 |
# Add a title (optional, you can remove this if not needed)
|
@@ -398,7 +398,7 @@ def chatbot(user_input, science_objectives="", context="", subdomain="", use_enc
|
|
398 |
response = f"### Science Objectives (User-Defined):\n{science_objectives}\n\n" + response
|
399 |
|
400 |
# Export the response to a Word document
|
401 |
-
word_doc_path = export_to_word(response, subdomain, user_input)
|
402 |
|
403 |
# Fetch exoplanet data
|
404 |
exoplanet_data = fetch_exoplanet_data()
|
|
|
254 |
return data_insights
|
255 |
|
256 |
|
257 |
+
def export_to_word(response_content, subdomain_definition, science_goal, science_objectives=""):
|
258 |
doc = Document()
|
259 |
|
260 |
# Add a title (optional, you can remove this if not needed)
|
|
|
398 |
response = f"### Science Objectives (User-Defined):\n{science_objectives}\n\n" + response
|
399 |
|
400 |
# Export the response to a Word document
|
401 |
+
word_doc_path = export_to_word(response, subdomain, user_input, science_objectives)
|
402 |
|
403 |
# Fetch exoplanet data
|
404 |
exoplanet_data = fetch_exoplanet_data()
|