Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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')
|