aquibmoin commited on
Commit
423c35e
1 Parent(s): fe00658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -26,10 +26,10 @@ ADS.TOKEN = os.getenv('ADS_API_KEY') # Ensure your ADS API key is stored in env
26
  system_message = """
27
  You are ExosAI, a helpful assistant specializing in Exoplanet research.
28
  Given the following scientific context and user input, generate a table with four columns:
29
- 1. Physical Parameters,
30
- 2. Observables,
31
- 3. Technical Requirements,
32
- 4. Relevant Scientific Goal.
33
 
34
  The table should include specific **technical requirements**, focussing on **optical and infrared wavelengths**, or any other relevant constraints based on the context, and avoid naming specific telescopes or instruments.
35
 
@@ -115,9 +115,9 @@ def fetch_exoplanet_data():
115
 
116
  def generate_response(user_input, relevant_context="", references=[], max_tokens=150, temperature=0.7, top_p=0.9, frequency_penalty=0.5, presence_penalty=0.0):
117
  if relevant_context:
118
- combined_input = f"Scientific Context: {relevant_context}\nUser Input: {user_input}\nPlease generate a table with the format: | Physical Parameters | Observables | Technical Requirements | Relevant Scientific Goal |"
119
  else:
120
- combined_input = f"User Input: {user_input}\nPlease generate a table with the format: | Physical Parameters | Observables | Technical Requirements | Relevant Scientific Goal |"
121
 
122
  response = client.chat.completions.create(
123
  model="gpt-4-turbo",
 
26
  system_message = """
27
  You are ExosAI, a helpful assistant specializing in Exoplanet research.
28
  Given the following scientific context and user input, generate a table with four columns:
29
+ 1. Physical Processes: what physical processes are relevant.
30
+ 2. Observables: what physical quantities to observe.
31
+ 3. Technical Requirements: wavelength ranges, spatial resolution etc.
32
+ 4. Relevant Scientific Goal: A scientific explanation of why these measurements are important.
33
 
34
  The table should include specific **technical requirements**, focussing on **optical and infrared wavelengths**, or any other relevant constraints based on the context, and avoid naming specific telescopes or instruments.
35
 
 
115
 
116
  def generate_response(user_input, relevant_context="", references=[], max_tokens=150, temperature=0.7, top_p=0.9, frequency_penalty=0.5, presence_penalty=0.0):
117
  if relevant_context:
118
+ combined_input = f"Scientific Context: {relevant_context}\nUser Input: {user_input}\nPlease generate a table with the format: | Physical Processes | Observables | Technical Requirements | Relevant Scientific Goal |"
119
  else:
120
+ combined_input = f"User Input: {user_input}\nPlease generate a table with the format: | Physical Processes | Observables | Technical Requirements | Relevant Scientific Goal |"
121
 
122
  response = client.chat.completions.create(
123
  model="gpt-4-turbo",