Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 57 additions & 3 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import streamlit as st
from streamlit_text_rating import rate_text

for text in ["Is this helpful?", "Do you like it?"]:
response = rate_text(text=text)
# st.write(f"response --> {response}")
2 changes: 1 addition & 1 deletion template/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include streamlit_text_like/frontend/build *
recursive-include streamlit_text_rating/frontend/build/ *
15 changes: 11 additions & 4 deletions template/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
eval "$(conda shell.bash hook)"
conda activate streamlit_dev
rm requirements.txt
pipreqs .
rm -r build
rm -r streamlit_text_rating.egg-info
rm -r dist
cd streamlit_text_rating/frontend/
npm install
rm -r build
npm run-script build
cd ../../
echo $PWD
python setup.py sdist bdist_wheel

#twine check dist/*
#twine upload --repository testpypi dist/*
#twine upload --repository pypi dist/*
twine check dist/*
twine upload --repository testpypi dist/*
twine upload --repository pypi dist/*
5 changes: 0 additions & 5 deletions template/build/lib/streamlit_text_rating/example.py

This file was deleted.

2 changes: 1 addition & 1 deletion template/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
]
)
)
2 changes: 1 addition & 1 deletion template/streamlit_text_rating.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: streamlit-text-rating
Version: 0.1.0
Version: 0.1.4
Summary: streamlit_text_ratings enables you to rate the text data
Home-page: https://github.com/TVS-Motor-Company/streamlit-text-rating
Author: Ashish Rai, Naga Budigam
Expand Down
18 changes: 17 additions & 1 deletion template/streamlit_text_rating.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@ MANIFEST.in
setup.py
streamlit_text_rating/__init__.py
streamlit_text_rating/example.py
streamlit_text_rating/st_text_rater.py
streamlit_text_rating/version.py
streamlit_text_rating.egg-info/PKG-INFO
streamlit_text_rating.egg-info/SOURCES.txt
streamlit_text_rating.egg-info/dependency_links.txt
streamlit_text_rating.egg-info/requires.txt
streamlit_text_rating.egg-info/top_level.txt
streamlit_text_rating.egg-info/top_level.txt
streamlit_text_rating/frontend/build/asset-manifest.json
streamlit_text_rating/frontend/build/bootstrap.min.css
streamlit_text_rating/frontend/build/dislike.png
streamlit_text_rating/frontend/build/index.html
streamlit_text_rating/frontend/build/like-button.png
streamlit_text_rating/frontend/build/precache-manifest.2f589f3e23a0c8a6481bd93d8344c3d8.js
streamlit_text_rating/frontend/build/service-worker.js
streamlit_text_rating/frontend/build/thumbsup.svg
streamlit_text_rating/frontend/build/static/js/2.d213324c.chunk.js
streamlit_text_rating/frontend/build/static/js/2.d213324c.chunk.js.LICENSE.txt
streamlit_text_rating/frontend/build/static/js/2.d213324c.chunk.js.map
streamlit_text_rating/frontend/build/static/js/main.5c689c72.chunk.js
streamlit_text_rating/frontend/build/static/js/main.5c689c72.chunk.js.map
streamlit_text_rating/frontend/build/static/js/runtime-main.11ec9aca.js
streamlit_text_rating/frontend/build/static/js/runtime-main.11ec9aca.js.map
26 changes: 2 additions & 24 deletions template/streamlit_text_rating/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
import os
import streamlit.components.v1 as components
import streamlit as st

_RELEASE = True

if not _RELEASE:
_component_func = components.declare_component(
"streamlit_text_rating", url="http://localhost:3001")
else:
parent_dir = os.path.dirname(os.path.abspath(__file__))
build_dir = os.path.join(parent_dir, "frontend/build")
_component_func = components.declare_component(
"streamlit_text_rating", path=build_dir)

def streamlit_text_like(text, color_text='rgb(0,0,0)', color_background='rgb(255, 255, 255)',
font_size='16px', font_family='sans-serif', font_weight=350, key=None, default=0):
r = _component_func(text=text, color_text=color_text, font_size=font_size, font_family=font_family,
color_background=color_background, font_weight=font_weight, key=key)
return r

# r1=streamlit_text_like(text='he is good',key='abc',font_size='40px')
# r2=streamlit_text_like(text='he is bad',key='ab2c')
# st.write(r1)
from .st_text_rater import *
from .version import __version__
5 changes: 0 additions & 5 deletions template/streamlit_text_rating/example.py

This file was deleted.

19 changes: 0 additions & 19 deletions template/streamlit_text_rating/frontend/build/asset-manifest.json

This file was deleted.

Loading