ababio commited on
Commit
fbca255
1 Parent(s): 7edf61a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -31,6 +31,7 @@ os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = get_credentials()
31
  max_seq_length = 2048
32
  dtype = None
33
  load_in_4bit = True
 
34
 
35
  # Check if 'punkt' is already downloaded, otherwise download it
36
  try:
@@ -188,7 +189,7 @@ user_input = st.text_area('Enter or Paste Text to Analyze', value=optionValue)
188
  button = st.button("Analyze")
189
 
190
 
191
- if button and user_input:
192
  alpaca_prompt = """Below is a conversation between a human and an AI agent. write a response based on the input.
193
  ### Instruction:
194
  predict the emotion word or words
@@ -271,3 +272,6 @@ if button and user_input:
271
  st.plotly_chart(fig_bar)
272
  # with tab3:
273
  # st.plotly_chart(fig_heatmap)
 
 
 
 
31
  max_seq_length = 2048
32
  dtype = None
33
  load_in_4bit = True
34
+ Auth_GCP = False
35
 
36
  # Check if 'punkt' is already downloaded, otherwise download it
37
  try:
 
189
  button = st.button("Analyze")
190
 
191
 
192
+ if button and user_input and Auth_GCP:
193
  alpaca_prompt = """Below is a conversation between a human and an AI agent. write a response based on the input.
194
  ### Instruction:
195
  predict the emotion word or words
 
272
  st.plotly_chart(fig_bar)
273
  # with tab3:
274
  # st.plotly_chart(fig_heatmap)
275
+
276
+ else:
277
+ st.write('Model deployment has been pursed due to cost')