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

Stress Level Detector Meter Correction #167

Open
Xblade9669 opened this issue Oct 19, 2024 · 8 comments
Open

Stress Level Detector Meter Correction #167

Xblade9669 opened this issue Oct 19, 2024 · 8 comments

Comments

@Xblade9669
Copy link

The Stress Level Detector asks us readings from 1 to 5 which according to me needs slight modification i.e. the meter reading should in my opinion start from 0.
As for some cases the category might be 0 , for example : seeking validation might be 0 for few people as they might be self satisfied with what they are doing or someone despite of watching social media might not be depressed and might as well be feeling extremely contended.

@yashasvini121
Copy link
Owner

Sure @Xblade9669, go ahead!

@Xblade9669
Copy link
Author

i am just a newbie!! you can assign others
Thank you

@Xblade9669 Xblade9669 removed their assignment Oct 19, 2024
@Shreyas-GN
Copy link

Shreyas-GN commented Oct 22, 2024

Heyyyy @yashasvini121

I agree upon @Xblade9669 and I believe the Stress Level Detector meter should start from 0, as some categories (e.g., compare_to_successful_people,) might not apply to everyone. Based on my experience with similar projects, and my eagerness to contribute to Open source(gssoc-ext), I’d like to work on resolving this. Could you please assign me to this issue?

@yashasvini121
Copy link
Owner

Hey, I agree that the Stress Level Detector doesn’t start from 0 because the dataset it’s based on doesn’t include 0. As mentioned in this discussion, the scale ranges from 1 to 5, representing "strongly disagree" to "strongly agree." So, whether it starts from 0 or 1 doesn’t carry any meaningful significance. If you'd like, you could add a description to clarify the scale or include text on the slider for better context.

Let me know if you’d like to proceed in this direction @Shreyas-GN.

@Shreyas-GN
Copy link

Hey @yashasvini121 ,
Thanks for clarifying! I get the reasoning for starting from 1. Adding a description or text on the slider would definitely help users understand the range better.

I'd be happy to work on this, but I’m unsure how to test the changes or use Streamlit for this project. Could you guide me on that? Once I have the info, I can submit a pull request with the updates.

Let me know if that works!

@yashasvini121
Copy link
Owner

Unfortunately, Streamlit sliders only accept numerical values internally, so you can't directly replace the slider values with text labels. Instead, you can use radio buttons to achieve a similar effect.

To implement this, modify the form_configs/stress_detection.json file by replacing the sliders with radio fields. Provide the options as ["Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"] and specify a default value for each. For now, you don't need to focus on the UI/UX.

Additionally, refer to the form_handler.py file to understand how the JSON file is utilized.

To run the Streamlit project, use the command streamlit run App.py.

@Shreyas-GN
Copy link

Shreyas-GN commented Oct 24, 2024

Hey @yashasvini121 ,
Got it! Thanks for the clarification. I’ll modify the form_configs/stress_detection.json to replace sliders with radio buttons and set the options as ["Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"], with appropriate default values.

I'll also check out the form_handler.py file to understand how the JSON is handled.

Thanks for the guidance, I’ll get started on this!

@Shreyas-GN
Copy link

Hey @yashasvini121 ,
I worked on replacing the sliders with radio buttons and achieved that successfully!
Screenshot 2024-10-25 105633

However, when I clicked the predict button, I encountered a NameError: name 'model' is not defined.
Screenshot 2024-10-25 105647

Should I focus on resolving that issue, or would you prefer that I proceed with the radio button design for now?

Thanks for your guidance!

Best,
Shreyas GN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants