lakshmivairamani commited on
Commit
2e60ad5
1 Parent(s): 04d3a52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -24
app.py CHANGED
@@ -109,39 +109,22 @@ with st.sidebar:
109
  data_ingestion() # Process PDF every time new file is uploaded
110
  st.success("Done")
111
 
112
- genre = st.radio(
113
  "Please select LLM",
114
- [":rainbow[mistralai/Mistral-7B-Instruct-v0.2]",":rainbow[google/gemma-7b-it]",":rainbow[google/gemma-1.1-7b-it]",]
115
- #":rainbow[deepset/roberta-base-squad2]",":rainbow[consciousAI/question-answering-roberta-base-s-v2]",
116
- #":rainbow[distilbert/distilbert-base-cased-distilled-squad]"]
117
- #captions = ["Laugh out loud.", "Get the popcorn.", "Never stop learning.","Get the popcorn.", "Never stop learning."]
118
  )
119
 
120
- if genre == ':rainbow[mistralai/Mistral-7B-Instruct-v0.2]':
121
  st.write('You selected Mistral-7B-Instruct-v0.2.')
122
  model_name_query="mistralai/Mistral-7B-Instruct-v0.2"
123
  flag = True
124
- elif genre == ':rainbow[google/gemma-7b-it]':
125
- st.write('You selected google/gemma-7b-it.')
126
- model_name_query="google/gemma-7b-it"
127
- flag = True
128
- elif genre == ':rainbow[google/gemma-1.1-7b-it]':
129
  st.write('You selected HuggingFaceH4/zephyr-7b-gemma-v0.1')
130
  model_name_query="google/gemma-1.1-7b-it"
131
  flag = True
132
- elif genre == ':rainbow[distilbert/distilbert-base-cased-distilled-squad]':
133
- st.write('You selected distilbert/distilbert-base-cased-distilled-squad')
134
- model_name_query="distilbert/distilbert-base-cased-distilled-squad"
135
- flag = False
136
- elif genre == ':rainbow[consciousAI/question-answering-roberta-base-s-v2]':
137
- st.write('You selected consciousAI/question-answering-roberta-base-s-v2')
138
- model_name_query="consciousAI/question-answering-roberta-base-s-v2"
139
- flag = False
140
- elif genre == ':rainbow[deepset/roberta-base-squad2]':
141
- st.write('You selected deepset/roberta-base-squad2')
142
- model_name_query="deepset/roberta-base-squad2"
143
- flag = False
144
-
145
  user_prompt = st.chat_input("Ask me anything about the content of the PDF:")
146
  if user_prompt:
147
  st.session_state.messages.append({'role': 'user', "content": user_prompt})
 
109
  data_ingestion() # Process PDF every time new file is uploaded
110
  st.success("Done")
111
 
112
+ model_name_select = st.radio(
113
  "Please select LLM",
114
+ [":rainbow[mistralai/Mistral-7B-Instruct-v0.2]",":rainbow[google/gemma-1.1-7b-it]"]
115
+
 
 
116
  )
117
 
118
+ if model_name_select == ':rainbow[mistralai/Mistral-7B-Instruct-v0.2]':
119
  st.write('You selected Mistral-7B-Instruct-v0.2.')
120
  model_name_query="mistralai/Mistral-7B-Instruct-v0.2"
121
  flag = True
122
+
123
+ elif model_name_select == ':rainbow[google/gemma-1.1-7b-it]':
 
 
 
124
  st.write('You selected HuggingFaceH4/zephyr-7b-gemma-v0.1')
125
  model_name_query="google/gemma-1.1-7b-it"
126
  flag = True
127
+
 
 
 
 
 
 
 
 
 
 
 
 
128
  user_prompt = st.chat_input("Ask me anything about the content of the PDF:")
129
  if user_prompt:
130
  st.session_state.messages.append({'role': 'user', "content": user_prompt})