eagle0504 commited on
Commit
8621a4a
β€’
1 Parent(s): 5ba2725

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -43,7 +43,7 @@ with st.expander("Instructions"):
43
 
44
  option = st.sidebar.selectbox(
45
  "Which task do you want to do?",
46
- ("Sentiment Analysis", "Medical Summarization", "Llama2 on YSA", "ChatGPT", "ChatGPT (with Google)"),
47
  )
48
 
49
 
@@ -98,6 +98,20 @@ if prompt := st.chat_input("What is up?"):
98
  final_response = call_chatgpt(query=engineered_prompt)
99
  except:
100
  final_response = "Sorry, the inference endpoint is temporarily down. πŸ˜”"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  elif option == "ChatGPT":
102
  if prompt:
103
  out = call_chatgpt(query=prompt)
 
43
 
44
  option = st.sidebar.selectbox(
45
  "Which task do you want to do?",
46
+ ("Sentiment Analysis", "Medical Summarization", "Llama2 on YSA", "Llama2 on BRK Letters", "ChatGPT", "ChatGPT (with Google)"),
47
  )
48
 
49
 
 
98
  final_response = call_chatgpt(query=engineered_prompt)
99
  except:
100
  final_response = "Sorry, the inference endpoint is temporarily down. πŸ˜”"
101
+ elif option == "Llama2 on BRK Letters":
102
+ if prompt:
103
+ try:
104
+ out = llama2_7b_brk_letters(prompt)
105
+ engineered_prompt = f"""
106
+ The user asked the question: {prompt}
107
+
108
+ We have found relevant content: {out}
109
+
110
+ Answer the user question based on the above content in paragraphs.
111
+ """
112
+ final_response = call_chatgpt(query=engineered_prompt)
113
+ except:
114
+ final_response = "Sorry, the inference endpoint is temporarily down. πŸ˜”"
115
  elif option == "ChatGPT":
116
  if prompt:
117
  out = call_chatgpt(query=prompt)