# Output not loading while running after deploying

**URL:** <https://discuss.streamlit.io/t/output-not-loading-while-running-after-deploying/69326>\
**Category:** Community Cloud\
**Tags:** discussion\
**Created:** [May 13, 2024, 6:51am UTC](https://discuss.streamlit.io/t/output-not-loading-while-running-after-deploying/69326 "2024-05-13T06:51:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SivaShankar-Juthuka](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/sivashankar-juthuka/32/42972_2.png) [@SivaShankar-Juthuka](https://discuss.streamlit.io/u/SivaShankar-Juthuka)\
**Post date:** [May 13, 2024, 6:51am UTC](https://discuss.streamlit.io/t/output-not-loading-while-running-after-deploying/69326/1 "2024-05-13T06:51:31Z")

</div>

```auto
/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptru  

```

```auto
  nner/script_runner.py:565 in _run_script                                      

```

```auto
                                                                                

```

```auto
  /mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py:267 in     

```

```auto
  <module>                                                                      

```

```auto
                                                                                

```

```auto
    264 if a == "Home":                                                         

```

```auto
    265 │ display_Home()                                                      

```

```auto
    266 elif a == "Analysis":                                                   

```

```auto
  ❱ 267 │ display_Analysis()                                                  

```

```auto
    268 elif a == "Contact Us":                                                 

```

```auto
    269 │ display_Contact_us()                                                

```

```auto
    270                                                                         

```

```auto
                                                                                

```

```auto
  /mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py:160 in     

```

```auto
  display_Analysis                                                              

```

```auto
                                                                                

```

```auto
    157 │ if st.button("Submit"):                                             

```

```auto
    158 │ │ tabs = st.tabs(['Result', 'Visual Representation'])             

```

```auto
    159 │ │ with tabs[0]:                                                   

```

```auto
  ❱ 160 │ │ │ process_analysis(nitrogen, phosphorus, potassium, Temperat  

```

```auto
    161 │ │ with tabs[1]:                                                   

```

```auto
    162 │ │ │ st.subheader('Visual Representation')                       

```

```auto
    163 │ │ │ if tabs[1].is_active:                                       

```

```auto
                                                                                

```

```auto
  /mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py:194 in     

```

```auto
  process_analysis                                                              

```

```auto
                                                                                

```

```auto
    191 │ │ None                                                            

```

```auto
    192 │ """                                                                 

```

```auto
    193 │ l = [n, p, k, T, H, aph]                                            

```

```auto
  ❱ 194 │ crop = solve(l)                                                     

```

```auto
    195 │ crop = ''.join(crop)                                                

```

```auto
    196 │ display_result(crop, l)                                             

```

```auto
    197                                                                         

```

```auto
                                                                                

```

```auto
  /mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py:237 in     

```

```auto
  solve                                                                         

```

```auto
                                                                                

```

```auto
    234 │ label_encoder = LabelEncoder()                                      

```

```auto
    235 │ y_encoded = label_encoder.fit_transform(y)                          

```

```auto
    236 │ rf_classifier = joblib.load(rf_model_path)                          

```

```auto
  ❱ 237 │ model = tf.keras.models.load_model(rnn_model_path)                  

```

```auto
    238 │ rf_prediction = rf_classifier.predict(testing_data)                 

```

```auto
    239 │ rnn_prediction = np.argmax(model.predict(np.expand_dims(testing_da  

```

```auto
    240 │ cmb_predc = (rf_prediction + rnn_prediction) / 2                    

```

```auto
                                                                                

```

```auto
  /home/adminuser/venv/lib/python3.10/site-packages/keras/utils/traceback_util  

```

```auto
  s.py:70 in error_handler                                                      

```

```auto
                                                                                

```

```auto
     67 │ │ │ filtered_tb = _process_traceback_frames(e. __traceback__ )    

```

```auto
     68 │ │ │ # To get the full stack trace, call:                        

```

```auto
     69 │ │ │ # `tf.debugging.disable_traceback_filtering()`              

```

```auto
  ❱ 70 │ │ │ raise e.with_traceback(filtered_tb) from None               

```

```auto
     71 │ │ finally:                                                        

```

```auto
     72 │ │ │ del filtered_tb                                             

```

```auto
     73                                                                         

```

```auto
                                                                                

```

```auto
  /home/adminuser/venv/lib/python3.10/site-packages/keras/engine/input_layer.p  

```

```auto
  y:152 in __init__                                                             

```

```auto
                                                                                

```

```auto
    149 │ │ │ │ batch_size = batch_input_shape[0]                       

```

```auto
    150 │ │ │ │ input_shape = batch_input_shape[1:]                     

```

```auto
    151 │ │ if kwargs:                                                      

```

```auto
  ❱ 152 │ │ │ raise ValueError(                                           

```

```auto
    153 │ │ │ │ f"Unrecognized keyword arguments: {list(kwargs.keys())  

```

```auto
    154 │ │ │ )                                                           

```

```auto
    155                                                                         

```

```auto
────────────────────────────────────────────────────────────────────────────────

```

```auto
ValueError: Unrecognized keyword arguments: ['batch_shape']

```

I’m not able to find any errors while running it in my local machine but I’m getting this errors after deploying it into the streamlit cloud. app is deployed but to get the output we have to click the submit button after clicking it got the above error.  
Can anyone able to look into this once.  
Here is my Repo Link - [Github Repo](https://github.com/SivaShankar-Juthuka/Optimization-of-NPK-Anlaysis-Using-Deep-Learning/tree/main)

Below error is the onscreen output

Traceback:

```auto
File "/home/adminuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module. __dict__ )File "/mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py", line 267, in <module>
    display_Analysis()File "/mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py", line 160, in display_Analysis
    process_analysis(nitrogen, phosphorus, potassium, Temperature, Humidity, PH_Value)File "/mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py", line 194, in process_analysis
    crop = solve(l)File "/mount/src/optimization-of-npk-anlaysis-using-deep-learning/app.py", line 237, in solve
    model = tf.keras.models.load_model(rnn_model_path)File "/home/adminuser/venv/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from NoneFile "/home/adminuser/venv/lib/python3.10/site-packages/keras/engine/input_layer.py", line 152, in __init__
    raise ValueError(

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [November 9, 2024, 6:52am UTC](https://discuss.streamlit.io/t/output-not-loading-while-running-after-deploying/69326/2 "2024-11-09T06:52:09Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
