aquibmoin commited on
Commit
7cbeeaf
1 Parent(s): 645e61e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -23,7 +23,7 @@ client = OpenAI(api_key=api_key)
23
  ADS.TOKEN = os.getenv('ADS_API_KEY') # Ensure your ADS API key is stored in environment variables
24
 
25
  # Define a system message to introduce Exos
26
- system_message = "You are Exos, a helpful assistant specializing in Exoplanet research. Provide detailed and accurate responses related to Exoplanet research."
27
 
28
  def encode_text(text):
29
  inputs = bi_tokenizer(text, return_tensors='pt', padding=True, truncation=True, max_length=128)
@@ -178,7 +178,7 @@ def chatbot(user_input, context="", use_encoder=False, max_tokens=150, temperatu
178
  iface = gr.Interface(
179
  fn=chatbot,
180
  inputs=[
181
- gr.Textbox(lines=2, placeholder="Formulate your science goal...", label="Prompt"),
182
  gr.Textbox(lines=5, placeholder="Enter some context here...", label="Context"),
183
  gr.Checkbox(label="Use NASA SMD Bi-Encoder for Context"),
184
  gr.Slider(50, 1000, value=150, step=10, label="Max Tokens"),
@@ -188,14 +188,14 @@ iface = gr.Interface(
188
  gr.Slider(0.0, 1.0, value=0.0, step=0.1, label="Presence Penalty")
189
  ],
190
  outputs=[
191
- gr.Textbox(label="Model Response..."),
192
  gr.HTML(label="Miro"),
193
  gr.HTML(label="Generate Mind Map on Mapify"),
194
  gr.File(label="Download SCDD", type="filepath"),
195
  gr.Dataframe(label="Exoplanet Data Table")
196
  ],
197
- title="SCDDBot - NASA SMD SCDD AI Assistant [version-0.4a]",
198
- description="SCDDBot is an AI-powered assistant for generating and visualising HWO Science Cases",
199
  )
200
 
201
  iface.launch(share=True)
 
23
  ADS.TOKEN = os.getenv('ADS_API_KEY') # Ensure your ADS API key is stored in environment variables
24
 
25
  # Define a system message to introduce Exos
26
+ system_message = "You are ExosAI, a helpful assistant specializing in Astrophysics and Exoplanet research. Provide detailed and accurate responses related to Astrophysics and Exoplanet research."
27
 
28
  def encode_text(text):
29
  inputs = bi_tokenizer(text, return_tensors='pt', padding=True, truncation=True, max_length=128)
 
178
  iface = gr.Interface(
179
  fn=chatbot,
180
  inputs=[
181
+ gr.Textbox(lines=2, placeholder="Enter your Science Goal here...", label="Prompt ExosAI"),
182
  gr.Textbox(lines=5, placeholder="Enter some context here...", label="Context"),
183
  gr.Checkbox(label="Use NASA SMD Bi-Encoder for Context"),
184
  gr.Slider(50, 1000, value=150, step=10, label="Max Tokens"),
 
188
  gr.Slider(0.0, 1.0, value=0.0, step=0.1, label="Presence Penalty")
189
  ],
190
  outputs=[
191
+ gr.Textbox(label="ExosAI finds..."),
192
  gr.HTML(label="Miro"),
193
  gr.HTML(label="Generate Mind Map on Mapify"),
194
  gr.File(label="Download SCDD", type="filepath"),
195
  gr.Dataframe(label="Exoplanet Data Table")
196
  ],
197
+ title="ExosAI - NASA SMD SCDD AI Assistant [version-0.4a]",
198
+ description="ExosAI is an AI-powered assistant for generating and visualising HWO Science Cases",
199
  )
200
 
201
  iface.launch(share=True)