{"id":15063780,"url":"https://github.com/snehankekre/streamlit-tensorboard","last_synced_at":"2025-04-10T11:25:44.137Z","repository":{"id":46567653,"uuid":"376540683","full_name":"snehankekre/streamlit-tensorboard","owner":"snehankekre","description":"Streamlit component for TensorBoard, TensorFlow's visualization toolkit","archived":false,"fork":false,"pushed_at":"2021-12-08T11:38:25.000Z","size":174,"stargazers_count":40,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T13:08:30.343Z","etag":null,"topics":["streamlit","tensorboard","tensorflow"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/streamlit-tensorboard/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snehankekre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-13T12:39:14.000Z","updated_at":"2025-04-07T20:28:32.000Z","dependencies_parsed_at":"2022-08-30T15:11:47.543Z","dependency_job_id":null,"html_url":"https://github.com/snehankekre/streamlit-tensorboard","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fstreamlit-tensorboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fstreamlit-tensorboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fstreamlit-tensorboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snehankekre%2Fstreamlit-tensorboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snehankekre","download_url":"https://codeload.github.com/snehankekre/streamlit-tensorboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208620,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["streamlit","tensorboard","tensorflow"],"created_at":"2024-09-25T00:07:10.977Z","updated_at":"2025-04-10T11:25:44.099Z","avatar_url":"https://github.com/snehankekre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# streamlit-tensorboard\n\n[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](http://snehankekre.com:8501/)\n\nThis is a work-in-progress, providing a function to embed [TensorBoard](https://www.tensorflow.org/tensorboard), TensorFlow's visualization toolkit, in Streamlit apps.\n\n## Installation :balloon:\n\n`pip install --upgrade streamlit-tensorboard`\n\n## Example Usage :computer:\n\n```python\nimport streamlit as st\nfrom streamlit_tensorboard import st_tensorboard\nimport tensorflow as tf\n\nimport datetime\nimport random\n\nmnist = tf.keras.datasets.mnist\n\n(x_train, y_train), (x_test, y_test) = mnist.load_data()\nx_train, x_test = x_train / 255.0, x_test / 255.0\n\ndef create_model():\n    return tf.keras.models.Sequential(\n        [\n            tf.keras.layers.Flatten(input_shape=(28, 28)),\n            tf.keras.layers.Dense(512, activation=\"relu\"),\n            tf.keras.layers.Dropout(0.2),\n            tf.keras.layers.Dense(10, activation=\"softmax\"),\n        ]\n    )\n\nmodel = create_model()\nmodel.compile(\n    optimizer=\"adam\", loss=\"sparse_categorical_crossentropy\", metrics=[\"accuracy\"]\n)\n\nlogdir = \"logs/fit/\" + datetime.datetime.now().strftime(\"%Y%m%d-%H%M%S\")\ntensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1)\n\nmodel.fit(\n    x=x_train,\n    y=y_train,\n    epochs=5,\n    validation_data=(x_test, y_test),\n    callbacks=[tensorboard_callback],\n)\n\n# Start TensorBoard\nst_tensorboard(logdir=logdir, port=6006, width=1080)\n```\n\n![st_tensorboard](https://github.com/snehankekre/streamlit-tensorboard/blob/master/_static/st-tensorboard-example.png)\n\n\n## Contributing :hammer_and_wrench:\n\nPlease file a new [GitHub issue](https://github.com/snehankekre/streamlit-tensorboard/issues) (if one doesn't already exist) for bugs, feature requests, suggestions for improvements, etc. If you have solutions to any [open issues](https://github.com/snehankekre/streamlit-tensorboard/issues), feel free to open a [Pull Request](https://github.com/snehankekre/streamlit-tensorboard/pulls)!\n\n## Supported Platforms\n\n1. Ubuntu\n2. Debian GNU/Linux\n3. macOS (⚠️ unverified)\n\nThis component will not work on [Streamlit Cloud](https://share.streamlit.io/). Due to security reasons, Streamlit Cloud does not allow users expose ports (as required by streamlit-tensorboard). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnehankekre%2Fstreamlit-tensorboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnehankekre%2Fstreamlit-tensorboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnehankekre%2Fstreamlit-tensorboard/lists"}