# \#keras

**URL:** https://discuss.streamlit.io/tag/keras/33.md

[Latest](https://discuss.streamlit.io/latest.md) · [Categories](https://discuss.streamlit.io/categories.md) · [Tags](https://discuss.streamlit.io/tags.md)

---

## [AI-Powered Maestro Finder](https://discuss.streamlit.io/t/ai-powered-maestro-finder/118627)

<div class="topic-metadata">

**Author:** [@aktham.momani](https://discuss.streamlit.io/u/aktham.momani)\
**Replies:** 0\
**Last updated:** [August 12, 2025, 6:30am UTC](https://discuss.streamlit.io/t/ai-powered-maestro-finder/118627 "2025-08-12T06:30:05Z")

</div>

Hey folks! i just completed a project I’ve been building: AI-Powered Maestro Finder — upload a MIDI or record a short solo piano clip and it guesses the composer (Bach / Beethoven / Chopin / Mozart) with confidence bars…

---

## [Issue with importing .pb (and potentially .h5) files](https://discuss.streamlit.io/t/issue-with-importing-pb-and-potentially-h5-files/82896)

<div class="topic-metadata">

**Author:** [@Brainiaciq](https://discuss.streamlit.io/u/Brainiaciq)\
**Replies:** 0\
**Last updated:** [October 6, 2024, 6:33pm UTC](https://discuss.streamlit.io/t/issue-with-importing-pb-and-potentially-h5-files/82896 "2024-10-06T18:33:58Z")

</div>

Hello, I made a simple model using tensorflow and keras, and saved it in /saved\_models/2. the structure seems fine, but I cannot find a way to import it in streamlit. I’ve tried: importing the .pb file: says it isnt…

---

## [Streamlit app failes to load weights](https://discuss.streamlit.io/t/streamlit-app-failes-to-load-weights/68510)

<div class="topic-metadata">

**Author:** [@Artificial\_Intellige](https://discuss.streamlit.io/u/Artificial_Intellige)\
**Replies:** 1\
**Last updated:** [May 7, 2024, 8:28pm UTC](https://discuss.streamlit.io/t/streamlit-app-failes-to-load-weights/68510 "2024-05-07T20:28:48Z")

</div>

Hello! This is my first app in streamlit. I trained a model to segment images. I used keras 2 to save the weights of model. Then, I achieved deploy my model in streamlit in my local computer (without errors). But, I ha…

---

## [Keras Error](https://discuss.streamlit.io/t/keras-error/65254)

<div class="topic-metadata">

**Author:** [@AnkushMallick](https://discuss.streamlit.io/u/AnkushMallick)\
**Replies:** 4\
**Last updated:** [May 1, 2024, 1:57pm UTC](https://discuss.streamlit.io/t/keras-error/65254 "2024-05-01T13:57:49Z")

</div>

DenseNet gives this error TypeError: \<class ‘keras.src.layers.convolutional.conv2d.Conv2D’\> could not be deserialized properly. Please ensure that components that are Python object instances (layers, models, etc.) retur…

---

## [ModuleNotFoundError: No module named 'keras'](https://discuss.streamlit.io/t/modulenotfounderror-no-module-named-keras/64856)

<div class="topic-metadata">

**Author:** [@adh](https://discuss.streamlit.io/u/adh)\
**Replies:** 3\
**Last updated:** [March 16, 2024, 2:08pm UTC](https://discuss.streamlit.io/t/modulenotfounderror-no-module-named-keras/64856 "2024-03-16T14:08:24Z")

</div>

I am facing this issue when I am trying to deploy the app. It is working just fine on local host. error: requirements.txt: code to load model: How do I resolve this? Help would be much appreciated

---

## [Deployment Troubleshooting](https://discuss.streamlit.io/t/deployment-troubleshooting/55245)

<div class="topic-metadata">

**Author:** [@Kendall\_McNeil](https://discuss.streamlit.io/u/Kendall_McNeil)\
**Replies:** 12\
**Last updated:** [November 14, 2023, 8:36am UTC](https://discuss.streamlit.io/t/deployment-troubleshooting/55245 "2023-11-14T08:36:39Z")

</div>

I am trying to deploy a lung abnormality detection app where the user submits a radiograph and the model detects abnormalities. The app works beautifully on my local computer, but is not working at deployment with the er…

---

## [Issue Loading KERAS Model](https://discuss.streamlit.io/t/issue-loading-keras-model/50465)

<div class="topic-metadata">

**Author:** [@abdullahahmedzone](https://discuss.streamlit.io/u/abdullahahmedzone)\
**Replies:** 2\
**Last updated:** [September 3, 2023, 3:15pm UTC](https://discuss.streamlit.io/t/issue-loading-keras-model/50465 "2023-09-03T15:15:53Z")

</div>

I’m having problem loading keras model getting this error only on streamlit cloud " Traceback: File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script\_runner.py”, line 552, in \_run\_…

---

## [Unable to push drag and drop stream lit app to stream lit cloud](https://discuss.streamlit.io/t/unable-to-push-drag-and-drop-stream-lit-app-to-stream-lit-cloud/29586)

<div class="topic-metadata">

**Author:** [@Adhokshaja\_Pradeep](https://discuss.streamlit.io/u/Adhokshaja_Pradeep)\
**Replies:** 2\
**Last updated:** [August 24, 2022, 5:01am UTC](https://discuss.streamlit.io/t/unable-to-push-drag-and-drop-stream-lit-app-to-stream-lit-cloud/29586 "2022-08-24T05:01:40Z")

</div>

I am new to stream-lit and I am trying to deploy an app using the stream-lit cloud facility(free version) that can be found here → Cloud • Streamlit The app that we are building, accepts image inputs through a drag and …

---

## [Noise Suppressor Web App](https://discuss.streamlit.io/t/noise-suppressor-web-app/22579)

<div class="topic-metadata">

**Author:** [@Mayuresh\_Agashe](https://discuss.streamlit.io/u/Mayuresh_Agashe)\
**Replies:** 0\
**Last updated:** [February 28, 2022, 4:16am UTC](https://discuss.streamlit.io/t/noise-suppressor-web-app/22579 "2022-02-28T04:16:24Z")

</div>

Noise Suppressor Web App In this era of online meetings, background noise removal systems are really essential for effective workflow. This project is a model that suppresses background noise. Some Useful Links Live Te…

---

## [Upload Keras models or pickled files](https://discuss.streamlit.io/t/upload-keras-models-or-pickled-files/2246)

<div class="topic-metadata">

**Author:** [@Abusnina](https://discuss.streamlit.io/u/Abusnina)\
**Replies:** 4\
**Last updated:** [December 25, 2021, 7:24pm UTC](https://discuss.streamlit.io/t/upload-keras-models-or-pickled-files/2246 "2021-12-25T19:24:39Z")

</div>

Our current file\_uplaoder is not able to upload machine learning models. Are you aware of any workaround? model\_path = st.file\_uploader("Choose a h5 file", type="h5") model = load\_model(model\_path) This gets me this e…

---

## [Compatible audio libraries with Streamlit - For running uploaded file through keras model](https://discuss.streamlit.io/t/compatible-audio-libraries-with-streamlit-for-running-uploaded-file-through-keras-model/18412)

<div class="topic-metadata">

**Author:** [@NMcKinney237](https://discuss.streamlit.io/u/NMcKinney237)\
**Replies:** 0\
**Last updated:** [October 22, 2021, 3:03am UTC](https://discuss.streamlit.io/t/compatible-audio-libraries-with-streamlit-for-running-uploaded-file-through-keras-model/18412 "2021-10-22T03:03:18Z")

</div>

This is a broad question that’s pretty high level. I’ve built a machine learning model and saved it as an h.5 file, and am trying to figure out the best way to approach using that model in Streamlit on an newly uploaded …

---

## [Model Deploy TypeError: expected str, bytes or os.PathLike object, not UploadedFile](https://discuss.streamlit.io/t/model-deploy-typeerror-expected-str-bytes-or-os-pathlike-object-not-uploadedfile/13932)

<div class="topic-metadata">

**Author:** [@techierushi](https://discuss.streamlit.io/u/techierushi)\
**Replies:** 3\
**Last updated:** [June 18, 2021, 10:42am UTC](https://discuss.streamlit.io/t/model-deploy-typeerror-expected-str-bytes-or-os-pathlike-object-not-uploadedfile/13932 "2021-06-18T10:42:24Z")

</div>

I’m trying to upload an image for my binary classification model, but constantly getting this error. I’ve used the other solutions mentioned in the forum, but still its not resolved. Please help. Here’s the code snip…

---

## [Can not predict on Front end streamlit with ktrain model, kindly provide suggestions about how to provide input for predict function](https://discuss.streamlit.io/t/can-not-predict-on-front-end-streamlit-with-ktrain-model-kindly-provide-suggestions-about-how-to-provide-input-for-predict-function/12950)

<div class="topic-metadata">

**Author:** [@Ashish\_Pandey1](https://discuss.streamlit.io/u/Ashish_Pandey1)\
**Replies:** 0\
**Last updated:** [May 15, 2021, 11:08am UTC](https://discuss.streamlit.io/t/can-not-predict-on-front-end-streamlit-with-ktrain-model-kindly-provide-suggestions-about-how-to-provide-input-for-predict-function/12950 "2021-05-15T11:08:06Z")

</div>

Its solved by myself, Thanks!

---

## [How to show ML model chart into streamlit](https://discuss.streamlit.io/t/how-to-show-ml-model-chart-into-streamlit/12225)

<div class="topic-metadata">

**Author:** [@Chandan\_Bisht](https://discuss.streamlit.io/u/Chandan_Bisht)\
**Replies:** 0\
**Last updated:** [April 25, 2021, 4:10pm UTC](https://discuss.streamlit.io/t/how-to-show-ml-model-chart-into-streamlit/12225 "2021-04-25T16:10:30Z")

</div>

Hi, I have trained a model (via Keras framework), exported it with model.save('model.hdf5') and now I want to integrate it with the awesome Streamlit. Obviously, I do not want to load the model every time the end-user …

---

## [Loading Keras models](https://discuss.streamlit.io/t/loading-keras-models/7289)

<div class="topic-metadata">

**Author:** [@felixdittrich92](https://discuss.streamlit.io/u/felixdittrich92)\
**Replies:** 2\
**Last updated:** [March 18, 2021, 4:56am UTC](https://discuss.streamlit.io/t/loading-keras-models/7289 "2021-03-18T04:56:32Z")

</div>

I have a little bit trouble with deploying streamlit app and loading keras models. If i run it locally it works fine. AttributeError: 'str' object has no attribute 'decode' Traceback: File "/usr/local/lib/python3.7/s…

---

## [Keras Image classification model working perfectly in Spyder but classifying only one class on Streamlit](https://discuss.streamlit.io/t/keras-image-classification-model-working-perfectly-in-spyder-but-classifying-only-one-class-on-streamlit/2312)

<div class="topic-metadata">

**Author:** [@Subhra\_Sankha\_Sardar](https://discuss.streamlit.io/u/Subhra_Sankha_Sardar)\
**Replies:** 7\
**Last updated:** [December 2, 2020, 3:42pm UTC](https://discuss.streamlit.io/t/keras-image-classification-model-working-perfectly-in-spyder-but-classifying-only-one-class-on-streamlit/2312 "2020-12-02T15:42:06Z")

</div>

Good day to all, Objective : To create a web app where anyone can use an Image CT scan to check whether someone has pneumonia or not Expected Result: To classify classes correctly when a new image is used \`\`\` rslt …

---

## [How to write(keras)](https://discuss.streamlit.io/t/how-to-write-keras/7662)

<div class="topic-metadata">

**Author:** [@Pascal\_Blansche](https://discuss.streamlit.io/u/Pascal_Blansche)\
**Replies:** 1\
**Last updated:** [December 2, 2020, 3:00pm UTC](https://discuss.streamlit.io/t/how-to-write-keras/7662 "2020-12-02T15:00:06Z")

</div>

Hi, what format do streamlit accept to write(keras)? A normal model?

---

## [Keras module not found](https://discuss.streamlit.io/t/keras-module-not-found/6866)

<div class="topic-metadata">

**Author:** [@NavyMint](https://discuss.streamlit.io/u/NavyMint)\
**Replies:** 3\
**Last updated:** [November 3, 2020, 11:25am UTC](https://discuss.streamlit.io/t/keras-module-not-found/6866 "2020-11-03T11:25:19Z")

</div>

Hi, dear community I faced a problem while deploying my first app. In my requirements txt i have keras dependency, and localy im able to run streamlit app, but each time im trying to deploy it returns me an error keras…

---

## [UnhashableTypeError: Cannot hash object of type \_thread.lock, found in the body of load\_detector\_model(). While caching the body of load\_detector\_model(), Streamlit encountered an object of type \_thread.lock, which it does not know how to hash](https://discuss.streamlit.io/t/unhashabletypeerror-cannot-hash-object-of-type-thread-lock-found-in-the-body-of-load-detector-model-while-caching-the-body-of-load-detector-model-streamlit-encountered-an-object-of-type-thread-lock-which-it-does-not-know-how-to-hash/4792)

<div class="topic-metadata">

**Author:** [@dracarys3](https://discuss.streamlit.io/u/dracarys3)\
**Replies:** 2\
**Last updated:** [August 21, 2020, 1:14pm UTC](https://discuss.streamlit.io/t/unhashabletypeerror-cannot-hash-object-of-type-thread-lock-found-in-the-body-of-load-detector-model-while-caching-the-body-of-load-detector-model-streamlit-encountered-an-object-of-type-thread-lock-which-it-does-not-know-how-to-hash/4792 "2020-08-21T13:14:35Z")

</div>

Here’s the Google colab link to replicate the error. The error has been occuring only on Google colab and I am not able to comprehend why. I am trying to use st.cache() on load\_detector\_model and inference function so …

---

## [I get an error everytime I change anything in my code](https://discuss.streamlit.io/t/i-get-an-error-everytime-i-change-anything-in-my-code/4706)

<div class="topic-metadata">

**Author:** [@dracarys3](https://discuss.streamlit.io/u/dracarys3)\
**Replies:** 5\
**Last updated:** [August 21, 2020, 12:42am UTC](https://discuss.streamlit.io/t/i-get-an-error-everytime-i-change-anything-in-my-code/4706 "2020-08-21T00:42:10Z")

</div>

Sorry, if this question sounds really silly. I am new to Streamlit, it’s really fun though. The part that’s been bothering me is I think error results when streamlit tries to import tensorflow or another module twice, b…

---

## [TensorFlow installation error while deploying Streamlit app](https://discuss.streamlit.io/t/tensorflow-installation-error-while-deploying-streamlit-app/4967)

<div class="topic-metadata">

**Author:** [@arun\_ramji](https://discuss.streamlit.io/u/arun_ramji)\
**Replies:** 1\
**Last updated:** [August 20, 2020, 1:39pm UTC](https://discuss.streamlit.io/t/tensorflow-installation-error-while-deploying-streamlit-app/4967 "2020-08-20T13:39:28Z")

</div>

Hi , I am getting below installation error for TensorFlow while deplyoing Streamlit app in DigitalOcean(CapRover) , below is the error log , can any one please help me on this !! ---\> Running in f1bd1382e6fb Collecting…

---

## [AttributeError: '\_thread.\_local' object has no attribute 'value'](https://discuss.streamlit.io/t/attributeerror-thread-local-object-has-no-attribute-value/574)

<div class="topic-metadata">

**Author:** [@Charly-Isabella](https://discuss.streamlit.io/u/Charly-Isabella)\
**Replies:** 8\
**Last updated:** [August 6, 2020, 3:22pm UTC](https://discuss.streamlit.io/t/attributeerror-thread-local-object-has-no-attribute-value/574 "2020-08-06T15:22:39Z")

</div>

I’m having an issue when I try to use a conditional statement to display text. My code is as follows: st.header('Expected Winnings Based on Risk Profile') option = st.radio("What level of risk would you like to adopt?",…

---

## [Solving Sudoku puzzles using Computer Vision](https://discuss.streamlit.io/t/solving-sudoku-puzzles-using-computer-vision/3450)

<div class="topic-metadata">

**Author:** [@vaithak](https://discuss.streamlit.io/u/vaithak)\
**Replies:** 5\
**Last updated:** [June 16, 2020, 8:05pm UTC](https://discuss.streamlit.io/t/solving-sudoku-puzzles-using-computer-vision/3450 "2020-06-16T20:05:09Z")

</div>

Hi everyone, I am new to this community. I want to share with you my project which allows the user to solve a Sudoku puzzle by uploading the puzzle’s image. The app is live at: http://104.215.248.88/sudoku The source c…

---

## [Cache Keras trained model](https://discuss.streamlit.io/t/cache-keras-trained-model/2398)

<div class="topic-metadata">

**Author:** [@Daniel\_Juravski](https://discuss.streamlit.io/u/Daniel_Juravski)\
**Replies:** 7\
**Last updated:** [May 15, 2020, 1:32pm UTC](https://discuss.streamlit.io/t/cache-keras-trained-model/2398 "2020-05-15T13:32:20Z")

</div>

Hi folks, I have trained a model (via Keras framework), exported it with model.save('model.hdf5') and now I want to integrate it with the awesome Streamlit. Obviously, I do not want to load the model every time the end…

---

## [Cached loading of Tensorflow/Keras models](https://discuss.streamlit.io/t/cached-loading-of-tensorflow-keras-models/1710)

<div class="topic-metadata">

**Author:** [@tobiasp](https://discuss.streamlit.io/u/tobiasp)\
**Replies:** 1\
**Last updated:** [January 29, 2020, 7:02pm UTC](https://discuss.streamlit.io/t/cached-loading-of-tensorflow-keras-models/1710 "2020-01-29T19:02:09Z")

</div>

Hi all, I want to cache loading of a MaskRCNN model that is implemented in Keras/Tensorflow since loading weights takes too long for me. I decorated the function to load the model with @st.cache(allow\_output\_mutation=Tr…

---

## [Error when I try and cache Keras](https://discuss.streamlit.io/t/error-when-i-try-and-cache-keras/1334)

<div class="topic-metadata">

**Author:** [@jcr592](https://discuss.streamlit.io/u/jcr592)\
**Replies:** 1\
**Last updated:** [December 14, 2019, 1:41am UTC](https://discuss.streamlit.io/t/error-when-i-try-and-cache-keras/1334 "2019-12-14T01:41:04Z")

</div>

Hi, I am trying to cache a Keras model and keep getting an error. Here is the code: @st.cache(allow\_output\_mutation=True) def add\_model(): model = load\_model('models/keras/model.h5') return model @st.cache(allo…
