aquibmoin commited on
Commit
1af8607
1 Parent(s): 701b0ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -32,9 +32,9 @@ def retrieve_relevant_context(user_input, context_texts):
32
 
33
  def generate_response(user_input, relevant_context="", max_tokens=150, temperature=0.7, top_p=0.9, frequency_penalty=0.5, presence_penalty=0.0):
34
  if relevant_context:
35
- combined_input = f"Context: {relevant_context}\nQuestion: {user_input}\nAnswer (please organize the answer in a structured format with topics and subtopics):"
36
  else:
37
- combined_input = f"Question: {user_input}\nAnswer (please organize the answer in a structured format with topics and subtopics):"
38
 
39
  response = client.chat.completions.create(
40
  model="gpt-4",
@@ -73,8 +73,8 @@ iface = gr.Interface(
73
  gr.Slider(0.0, 1.0, value=0.0, step=0.1, label="Presence Penalty")
74
  ],
75
  outputs=gr.Textbox(label="ExosAI response..."),
76
- title="ExosAI - NASA SMD SCDD Generator - [version 0.4a]",
77
- description="ExosAI is a helpful AI assistant for the automated generation of Science Case Development Documents (SCDD)",
78
  )
79
 
80
  # Launch the interface
 
32
 
33
  def generate_response(user_input, relevant_context="", max_tokens=150, temperature=0.7, top_p=0.9, frequency_penalty=0.5, presence_penalty=0.0):
34
  if relevant_context:
35
+ combined_input = f"Context: {relevant_context}\nQuestion: {user_input}\nAnswer:"
36
  else:
37
+ combined_input = f"Question: {user_input}\nAnswer:"
38
 
39
  response = client.chat.completions.create(
40
  model="gpt-4",
 
73
  gr.Slider(0.0, 1.0, value=0.0, step=0.1, label="Presence Penalty")
74
  ],
75
  outputs=gr.Textbox(label="ExosAI response..."),
76
+ title="ExosAI - NASA SMD SCDD Generator",
77
+ description="ExosAI is a helpful AI assistant for the automated generation of Science Case Development Documents",
78
  )
79
 
80
  # Launch the interface