awinml commited on
Commit
b19bb41
1 Parent(s): 12db858

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -131,7 +131,9 @@ def gpt3_qa(query, answer):
131
 
132
  st.title("Abstractive Question Answering")
133
 
134
- st.write("The app uses the quarterly earnings call transcripts for 10 companies (Apple, AMD, Amazon, Cisco, Google, Microsoft, Nvidia, ASML, Intel, Micron) for the years 2016 to 2020.")
 
 
135
 
136
  query_text = st.text_input("Input Query", value="Who is the CEO of Apple?")
137
 
@@ -147,25 +149,21 @@ encoder_model = st.selectbox("Select Encoder Model", encoder_models_choice)
147
 
148
  # Choose decoder model
149
 
150
- decoder_models_choice = ["GPT3 (QA_davinci)", "GPT3 (summary_davinci)", "T5", "FLAN-T5"]
151
 
152
  decoder_model = st.selectbox("Select Decoder Model", decoder_models_choice)
153
 
154
 
155
  if encoder_model == "MPNET":
156
  # Connect to pinecone environment
157
- pinecone.init(
158
- api_key=st.secrets["pinecone_mpnet"], environment="us-east1-gcp"
159
- )
160
  pinecone_index_name = "week2-all-mpnet-base"
161
  pinecone_index = pinecone.Index(pinecone_index_name)
162
  retriever_model = get_mpnet_embedding_model()
163
 
164
  elif encoder_model == "SGPT":
165
  # Connect to pinecone environment
166
- pinecone.init(
167
- api_key=st.secrets["pinecone_sgpt"], environment="us-east1-gcp"
168
- )
169
  pinecone_index_name = "week2-sgpt-125m"
170
  pinecone_index = pinecone.Index(pinecone_index_name)
171
  retriever_model = get_sgpt_embedding_model()
 
131
 
132
  st.title("Abstractive Question Answering")
133
 
134
+ st.write(
135
+ "The app uses the quarterly earnings call transcripts for 10 companies (Apple, AMD, Amazon, Cisco, Google, Microsoft, Nvidia, ASML, Intel, Micron) for the years 2016 to 2020."
136
+ )
137
 
138
  query_text = st.text_input("Input Query", value="Who is the CEO of Apple?")
139
 
 
149
 
150
  # Choose decoder model
151
 
152
+ decoder_models_choice = ["FLAN-T5", "T5", "GPT3 (QA_davinci)", "GPT3 (summary_davinci)"]
153
 
154
  decoder_model = st.selectbox("Select Decoder Model", decoder_models_choice)
155
 
156
 
157
  if encoder_model == "MPNET":
158
  # Connect to pinecone environment
159
+ pinecone.init(api_key=st.secrets["pinecone_mpnet"], environment="us-east1-gcp")
 
 
160
  pinecone_index_name = "week2-all-mpnet-base"
161
  pinecone_index = pinecone.Index(pinecone_index_name)
162
  retriever_model = get_mpnet_embedding_model()
163
 
164
  elif encoder_model == "SGPT":
165
  # Connect to pinecone environment
166
+ pinecone.init(api_key=st.secrets["pinecone_sgpt"], environment="us-east1-gcp")
 
 
167
  pinecone_index_name = "week2-sgpt-125m"
168
  pinecone_index = pinecone.Index(pinecone_index_name)
169
  retriever_model = get_sgpt_embedding_model()