maykcaldas commited on
Commit
e6c5ede
1 Parent(s): b2ed8a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -17,7 +17,7 @@ def agent_run(q, openai_api_key, mapi_api_key, serp_api_key):
17
  try:
18
  out = agent_chain.run(q)
19
  except Exception as err:
20
- out = f"Something went wrong, please try again.\nError: {err}"
21
  return out
22
 
23
  with gr.Blocks(css=css_style) as demo:
@@ -26,16 +26,16 @@ with gr.Blocks(css=css_style) as demo:
26
  - Developed by: Mayk Caldas ([@maykcaldas](https://github.com/maykcaldas)) and Sam Cox ([@SamCox822](https://github.com/SamCox822))
27
 
28
  ## What is this?
29
- - This is a demo of a LLM agent that can answer questions about materials science using the [LangChain🦜️🔗](https://github.com/hwchase17/langchain/) and the [Materials Project API](https://materialsproject.org/).
30
- - Its behave is based on Large Language Models (LLM) and aim to be a tool to help scientists with quick predictions of a nunerous of properties of materials.
31
  It is a work in progress, so please be patient with it.
32
 
33
 
34
- ### Some keys are needed in order to use it:
35
  1. An openAI API key ( [Check it here](https://platform.openai.com/account/api-keys) )
36
- 2. A material project's API key ( [Check it here](https://materialsproject.org/api#api-key) )
37
  3. A SERP API key ( [Check it here](https://serpapi.com/account-api) )
38
- - Only used if the chain decides to run a web search to answer the question.
39
  ''')
40
  with gr.Accordion("List of properties we developed tools for", open=False):
41
  gr.Markdown(f"""
@@ -61,7 +61,7 @@ with gr.Blocks(css=css_style) as demo:
61
  mapi_api_key = gr.Textbox(
62
  label="Material Project API Key", placeholder="...", type="password")
63
  serp_api_key = gr.Textbox(
64
- label="Material Project API Key", placeholder="...", type="password")
65
  with gr.Tab("MAPI Query"):
66
  text_input = gr.Textbox(label="", placeholder="Enter question here...")
67
  text_output = gr.Textbox(placeholder="Your answer will appear here...")
 
17
  try:
18
  out = agent_chain.run(q)
19
  except Exception as err:
20
+ out = f"Something went wrong. Please try again.\nError: {err}"
21
  return out
22
 
23
  with gr.Blocks(css=css_style) as demo:
 
26
  - Developed by: Mayk Caldas ([@maykcaldas](https://github.com/maykcaldas)) and Sam Cox ([@SamCox822](https://github.com/SamCox822))
27
 
28
  ## What is this?
29
+ - This is a demo of an app that can answer questions about material science using the [LangChain🦜️🔗](https://github.com/hwchase17/langchain/) and the [Materials Project API](https://materialsproject.org/).
30
+ - Its behavior is based on Large Language Models (LLM), and it aims to be a tool to help scientists with quick predictions of numerous properties of materials.
31
  It is a work in progress, so please be patient with it.
32
 
33
 
34
+ ### Some keys are needed to use it:
35
  1. An openAI API key ( [Check it here](https://platform.openai.com/account/api-keys) )
36
+ 2. A Material Project's API key ( [Check it here](https://materialsproject.org/api#api-key) )
37
  3. A SERP API key ( [Check it here](https://serpapi.com/account-api) )
38
+ - Only used if the chain runs a web search to answer the question.
39
  ''')
40
  with gr.Accordion("List of properties we developed tools for", open=False):
41
  gr.Markdown(f"""
 
61
  mapi_api_key = gr.Textbox(
62
  label="Material Project API Key", placeholder="...", type="password")
63
  serp_api_key = gr.Textbox(
64
+ label="Serp API Key", placeholder="...", type="password")
65
  with gr.Tab("MAPI Query"):
66
  text_input = gr.Textbox(label="", placeholder="Enter question here...")
67
  text_output = gr.Textbox(placeholder="Your answer will appear here...")