Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,13 +16,18 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
16 |
trust_remote_code=True # Required for llama3 models
|
17 |
)
|
18 |
|
|
|
|
|
19 |
model = AutoModelForCausalLM.from_pretrained(
|
20 |
model_name,
|
21 |
token=hf_token,
|
22 |
trust_remote_code=True,
|
23 |
-
torch_dtype=torch.float16,
|
24 |
-
device_map="auto"
|
25 |
-
)
|
|
|
|
|
|
|
26 |
|
27 |
# --- Define llm generation function ---
|
28 |
def llm(prompt, max_new_tokens=1000, temperature=0.3, do_sample=True):
|
@@ -59,191 +64,8 @@ questions = [
|
|
59 |
("Have you experienced anxiety symptoms like palpitations, choking, or dry mouth for the past 6 months?", "क्या आपको पिछले 6 महीनों से घबराहट जैसे लक्षण (जैसे धड़कन तेज होना, गला बंद लगना, मुंह सूखना) महसूस हुए हैं?"),
|
60 |
("Have these anxiety symptoms occurred in most situations over the past 6 months?", "क्या ये घबराहट के लक्षण पिछले 6 महीनों में ज्यादातर स्थितियों में हुए हैं?"),
|
61 |
("Have you had difficulty concentrating or thinking clearly for at least 2 weeks?", "क्या आपको पिछले 2 हफ्तों से ध्यान केंद्रित करने या स्पष्ट रूप से सोचने में कठिनाई हुई है?"),
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
("Have you experienced sudden episodes of intense fear or panic without any clear reason?", "क्या आपने बिना किसी स्पष्ट कारण के अचानक तीव्र डर या घबराहट के दौरे का अनुभव किया है?"),
|
66 |
-
("If yes, did these episodes include symptoms like shortness of breath, chest tightness, dizziness, or fear of dying?", "क्या इन दौरों में सांस फूलना, सीने में जकड़न, चक्कर आना या मरने का डर शामिल था?"),
|
67 |
-
("Have you avoided certain places or situations for fear of having another panic attack?", "क्या आपने किसी दौरे के डर से कुछ जगहों या परिस्थितियों से बचाव किया है?"),
|
68 |
-
|
69 |
-
# Phobias (Specific / Agoraphobia)
|
70 |
-
|
71 |
-
("Do you have an intense fear of specific things (like heights, animals, injections, or closed spaces)?", "क्या आपको किसी विशेष चीज़ (जैसे ऊंचाई, जानवर, इंजेक्शन, बंद जगह) से तीव्र डर लगता है?"),
|
72 |
-
("Do you go out of your way to avoid these feared objects or situations?", "क्या आप इन डरावनी चीज़ों या परिस्थितियों से बचने के लिए रास्ता बदलते हैं?"),
|
73 |
-
("Do you avoid crowded places, public transport, or being alone outside due to fear or anxiety?", "क्या आप डर या चिंता के कारण भीड़भाड़ वाली जगहों, सार्वजनिक परिवहन या अकेले बाहर जाने से बचते हैं?"),
|
74 |
-
|
75 |
-
# Social Anxiety / Avoidant Behavior
|
76 |
-
("Have you avoided social situations due to fear or suspicion about others noticing or judging you?", "क्या आपने डर या संदेह के कारण सामाजिक स्थितियों से दूरी बनाई है?"),
|
77 |
-
("Have you felt extremely self-conscious or judged by others?", "क्या आप अत्यधिक आत्म-जागरूक या दूसरों द्वारा आंकने का डर महसूस करते हैं?"),
|
78 |
-
("Do you worry for days before a social event or gathering?", "क्या आप किसी सामाजिक कार्यक्रम या सभा से पहले कई दिनों तक चिंता में रहते हैं?"),
|
79 |
-
("Have you avoided speaking in public or meeting new people due to nervousness?", "क्या आपने घबराहट या शर्मिंदगी के डर से सार्वजनिक रूप से बोलने या नए लोगों से मिलने से परहेज किया है?"),
|
80 |
-
("Do you often fear being criticized, laughed at, or rejected in social settings?", "क्या आप अक्सर सामाजिक स्थितियों में आलोचना, मजाक उड़ाए जाने या अस्वीकार किए जाने से डरते हैं?"),
|
81 |
-
("Has fear of judgment interfered with your work, education, or relationships?", "क्या दूसरों के द्वारा आंकने का डर कभी आपके काम, पढ़ाई या रिश्तों में बाधा बना है?"),
|
82 |
-
("Do you avoid eye contact or feel intense discomfort while interacting with others?", "क्या आप दूसरों से बातचीत करते समय आंख मिलाने से बचते हैं या बहुत असहज महसूस करते हैं?"),
|
83 |
-
|
84 |
-
# Health Anxiety / Somatic Preoccupation
|
85 |
-
|
86 |
-
("Do you frequently worry that you may have a serious illness despite medical reassurance?", "क्या आप बार-बार सोचते हैं कि आपको कोई गंभीर बीमारी है, भले ही डॉक्टर ने कहा हो कि आप ठीक हैं?"),
|
87 |
-
("Do you often monitor your body for symptoms or check your pulse, breathing, or temperature repeatedly?", "क्या आप बार-बार अपने शरीर के लक्षणों को जांचते हैं, जैसे नाड़ी, सांस या तापमान?"),
|
88 |
-
("Do health-related fears interfere with your daily functioning?", "क्या स्वास्थ्य संबंधी डर आपके रोज़मर्रा के कामों में बाधा डालते हैं?"),
|
89 |
-
|
90 |
-
# Obsessive-Compulsive Spectrum
|
91 |
-
|
92 |
-
("Do you experience intrusive, distressing thoughts that are hard to control?", "क्या आपके मन में बार-बार अनचाहे और परेशान करने वाले विचार आते हैं जिन्हें आप नियंत्रित नहीं कर पाते?"),
|
93 |
-
("Do you feel the need to perform certain actions or rituals (like checking, counting, or washing) to reduce anxiety?", "क्या आप चिंता कम करने के लिए कुछ विशेष कार्य या नियम (जैसे जांचना, गिनती करना, बार-बार हाथ धोना) करने की आवश्यकता महसूस करते हैं?"),
|
94 |
-
("Do you check things like locks, switches, or appliances repeatedly, even when you know they’re safe?", "क्या आप ताले, स्विच या उपकरणों जैसी चीजों को बार-बार जांचते हैं, भले ही आप जानते हों कि वे सुरक्षित हैं?"),
|
95 |
-
("Do you feel the need to do things in a specific order or repeatedly to feel 'just right'?", "क्या आपको चीजें किसी विशेष क्रम में या बार-बार करने की आवश्यकता महसूस होती है ताकि सब 'सही' लगे?"),
|
96 |
-
("Do you avoid certain situations, people, or objects that trigger obsessive thoughts (e.g., dirt, numbers, religious items)?", "क्या आप ऐसी परिस्थितियों, लोगों या वस्तुओं से बचते हैं जो जबरन विचारों को ट्रिगर करते हैं (जैसे गंदगी, नंबर, धार्मिक चीज़ें)?"),
|
97 |
-
("Do you wash your hands or clean excessively due to a fear of contamination or getting sick?", "क्या आप संक्रमण या बीमार होने के डर से बार-बार हाथ धोते हैं या सफाई करते हैं?"),
|
98 |
-
("Do these thoughts or behaviors cause significant distress or interfere with your daily life?", "क्या ये विचार या व्यवहार आपको बहुत परेशान करते हैं या आपके रोज़मर्रा के जीवन में बाधा डालते हैं?"),
|
99 |
-
|
100 |
-
# Body Dysmorphic Disorder (BDD)
|
101 |
-
("Do you spend a lot of time worrying about flaws in your appearance that others hardly notice?", "क्या आप अपनी शारीरिक बनावट की खामियों को लेकर बहुत अधिक चिंतित रहते हैं जिन्हें अन्य लोग शायद ही देखें?"),
|
102 |
-
("Do you avoid mirrors or check your appearance frequently due to dissatisfaction?", "क्या आप आईने से बचते हैं या बार-बार अपनी शक्ल जांचते हैं क्योंकि आप संतुष्ट नहीं होते?"),
|
103 |
-
("Have these concerns about your appearance affected your social or work life?", "क्या आपकी शक्ल-सूरत को लेकर चिंताएं आपके सामाजिक या कार्य जीवन को प्रभावित करती हैं?"),
|
104 |
-
|
105 |
-
# Hoarding Disorder
|
106 |
-
("Do you find it very difficult to throw away items, even things with little or no value?", "क्या आपको चीजें फेंकने में बहुत कठिनाई होती है, भले ही उनका कोई विशेष उपयोग या मूल्य न हो?"),
|
107 |
-
("Do you feel anxious or distressed at the idea of discarding possessions?", "क्या सामान फेंकने की कल्पना मात्र से ही आपको बेचैनी या तनाव महसूस होता है?"),
|
108 |
-
("Is your home or space cluttered due to accumulation of things you rarely use?", "क्या आपका घर या स्थान उन चीजों से भरा हुआ है जिन्हें आप शायद ही कभी उपयोग करते हैं?"),
|
109 |
-
|
110 |
-
# Trichotillomania (Hair-Pulling)
|
111 |
-
("Do you repeatedly pull out your hair (from scalp, eyebrows, eyelashes, etc.) without being able to stop?", "क्या आप बार-बार अपने बाल (सिर, भौंह, पलक आदि से) खींचते हैं और रोक नहीं पाते?"),
|
112 |
-
("If yes, do you feel tension before pulling and relief or satisfaction afterward?", "क्या बाल खींचने से पहले तनाव और बाद में राहत या संतोष महसूस होता है?"),
|
113 |
-
("Has this behavior caused bald patches or affected your appearance?", "क्या इस व्यवहार के कारण गंजापन या आपकी शक्ल पर असर पड़ा है?"),
|
114 |
-
|
115 |
-
# Excoriation (Skin-Picking)
|
116 |
-
("Do you repeatedly pick at your skin, causing sores or scabs?", "क्या आप बार-बार अपनी त्वचा को नोचते हैं जिससे घाव या पपड़ी बनती है?"),
|
117 |
-
("If yes, Have you tried to stop this behavior but couldn't?", "क्या आपने इस आदत को रोकने की कोशिश की है लेकिन सफल नहीं हुए?"),
|
118 |
-
("If yes, Has skin-picking led to noticeable marks or infections?", "क्या त्वचा नोचने से निशान या संक्रमण हो गए हैं?"),
|
119 |
-
|
120 |
-
# General Impulsivity
|
121 |
-
("Do you often act on sudden urges without thinking about the consequences?", "क्या आप अक्सर अचानक आवेगों पर बिना परिणाम सोचे कार्य करते हैं?"),
|
122 |
-
("Do you feel unable to control your behavior even when you know it may harm you or others?", "क्या आप जानते हुए भी कि आपका व्यवहार आपको या दूसरों को नुकसान पहुँचा सकता है, उसे रोक नहीं पाते?"),
|
123 |
-
("Do you often act on strong urges without thinking about the consequences?", "35. क्या आप अक्सर बिना परिणाम सोचे तीव्र इच्छाओं पर कार्य करते हैं?"),
|
124 |
-
("Have you ever had sudden outbursts of anger or aggression that felt uncontrollable?", "36. क्या आपको कभी अचानक गुस्से या आक्रामकता के दौरे आए हैं जिन्हें आप नियंत्रित नहीं कर पाए?"),
|
125 |
-
("Do you feel regret or guilt after acting on an impulse?", "37. क्या आप आवेग में कुछ करने के बाद पछतावा या अपराधबोध महसूस करते हैं?"),
|
126 |
-
("Do others say you’re reckless, easily provoked, or unable to stop yourself once triggered?", "42. क्या दूसरे लोग कहते हैं कि आप लापरवाह हैं, जल्दी उकस जाते हैं, या एक बार शुरू होने पर खुद को रोक नहीं पाते?"),
|
127 |
-
|
128 |
-
#Intermittent Explosive Disorder (IED)
|
129 |
-
("Have you had sudden outbursts of anger or aggression that seem excessive for the situation?", "क्या आपने ऐसे गुस्से या आक्रामकता के अचानक फूट पड़ने का अनुभव किया है जो स्थिति के लिए अत्यधिक लगता हो?"),
|
130 |
-
("Do you later regret your aggressive behavior or feel embarrassed by it?", "क्या आप ��ाद में अपने आक्रामक व्यवहार पर पछताते हैं या शर्मिंदा होते हैं?"),
|
131 |
-
|
132 |
-
# Kleptomania
|
133 |
-
("Have you ever felt a strong urge to steal things you don’t need or that have little value?", "क्या आपने कभी ऐसी चीजें चुराने की तीव्र इच्छा महसूस की है जिनकी आपको जरूरत नहीं थी या जिनका कोई खास मूल्य नहीं था?"),
|
134 |
-
("Do you feel tension before stealing and relief afterward?", "क्या चुराने से पहले तनाव और बाद में राहत महसूस होती है?"),
|
135 |
-
|
136 |
-
# Pyromania
|
137 |
-
("Have you ever set fires intentionally to relieve inner tension or feel excitement?", "क्या आपने कभी अंदरूनी तनाव दूर करने या उत्साह पाने के लिए जानबूझकर आग लगाई है?"),
|
138 |
-
("Do you feel fascinated or obsessed with fire or things related to fire?", "क्या आपको आग या उससे जुड़ी चीजों के प्रति अत्यधिक आकर्षण या जुनून महसूस होता है?"),
|
139 |
-
("Have you ever had difficulty resisting urges to engage in risky or inappropriate sexual behavior?", "40. क्या आपको जोखिम भरे या अनुचित यौन व्यवहार की इच्छाओं का विरोध करने में कठिनाई हुई है?"),
|
140 |
-
|
141 |
-
|
142 |
-
# Major Depression
|
143 |
-
# =========================
|
144 |
-
("Have you been feeling sad or emotionally numb for more than 2 weeks?", "6. क्या आप दो हफ्तों से अधिक समय से दुखी या भावनात्मक रूप से सुन्न महसूस कर रहे हैं?"),
|
145 |
-
("Have you lost interest in hobbies or activities you usually enjoy for at least 2 weeks?", "7. क्या आपने पिछले 2 हफ्तों से अपनी रुचियों में रुचि खो दी है?"),
|
146 |
-
("Have you had difficulty concentrating or thinking clearly for at least 2 weeks?", "8. क्या आपको पिछले 2 हफ्तों से सोचने या ध्यान केंद्रित करने में कठिनाई हो रही है?"),
|
147 |
-
("Have you had a significant change in appetite or weight in the past 2 weeks?", "9. क्या आपके खाने की इच्छा या वजन में पिछले दो हफ्तों में बदलाव आया है?"),
|
148 |
-
("Has your sleep duration changed noticeably in the past 2 weeks?", "10. क्या आपकी नींद की अवधि में पिछले दो हफ्तों में बदलाव आया है?"),
|
149 |
-
("Have you felt fatigued or lacked energy for most of the day for 2 weeks?", "11. क्या आप दिन भर थकान या ऊर्जा की कमी महसूस कर रहे हैं?"),
|
150 |
-
("Have you been unusually irritable for most days in the past 2 weeks?", "12. क्या आप पिछले दो हफ्तों से अत्यधिक चिड़चिड़े महसूस कर रहे हैं?"),
|
151 |
-
|
152 |
-
# Bipolar Disorder
|
153 |
-
("Have you had a period of feeling extremely high or cheerful for at least 4 days in a row?", "क्या आपने लगातार 4 दिनों तक अत्यधिक प्रसन्नता या उत्साह महसूस किया है?"),
|
154 |
-
("Have you felt highly energetic and slept very little for several consecutive days?", "क्या आपने कई दिनों तक बहुत अधिक ऊर्जा महसूस की है और बहुत कम नींद ली है?"),
|
155 |
-
("Have you had a burst of new ideas, risky behavior, or overspending for several days or more?", "क्या आपने कुछ दिनों तक नए विचारों की अधिकता, जोखिमपूर्ण व्यवहार या अत्यधिक खर्च किया है?"),
|
156 |
-
("Have others told you that you were talking too fast or seemed unusually confident or restless?", "क्या दूसरों ने आपसे कहा है कि आप बहुत तेज़ बोल रहे थे या असामान्य रूप से आत्मविश्वासी या बेचैन लग रहे थे?"),
|
157 |
-
("Have you ever felt so irritable or excited that it caused problems at work, in relationships, or socially?", "क्या आप कभी इतने चिड़चिड़े या उत्तेजित हुए हैं कि इससे आपके काम, रिश्तों या सामाजिक जीवन में परेशानी हुई हो?"),
|
158 |
-
("Have you had periods of feeling unusually low, sad, or hopeless for days or weeks at a time?", "क्या आपके जीवन में ऐसे समय आए हैं जब आप कई दिनों या हफ्तों तक बहुत उदास या निराश महसूस करते थे?"),
|
159 |
-
("Have your energy, motivation, or interest in usual activities significantly dropped for several days?", "क्या कुछ दिनों तक आपकी ऊर्जा, प्रेरणा या सामान्य गतिविधियों में रुचि में काफी कमी आई है?"),
|
160 |
-
("Have you had mood swings where your mood shifted between feeling overly cheerful and very low?", "क्या आपके मूड में अचानक उतार-चढ़ाव होते हैं, जैसे कभी बहुत खुश और कभी बहुत उदास महसूस करना?"),
|
161 |
-
|
162 |
-
|
163 |
-
# Psychotic Spectrum
|
164 |
-
|
165 |
-
("In the past month, have you seen, heard, or felt things that others could not?", "क्या आपने पिछले एक महीने में ऐसी चीजें देखी, सुनी या महसूस की हैं जो दूसरों ने नहीं कीं?"),
|
166 |
-
("In the past month, have you heard voices that no one else could hear?", "क्या आपने पिछले एक महीने में ऐसी आवाजें सुनी हैं जिन्हें और कोई नहीं सुन सका?"),
|
167 |
-
("In the past month or more, have you seen things that were not really there?", "क्या आपने पिछले एक महीने या उससे अधिक समय से ऐसी चीजें देखी हैं जो वास्तव में नहीं थीं?"),
|
168 |
-
("In the past month, have you felt like something outside your control was making you act or think?", "क्या आपको पिछले महीने ऐसा लगा कि कोई बाहरी ताकत आपके सोचने या काम करने को नियंत्रित कर रही है?"),
|
169 |
-
("Have you felt like other people could read your mind?", "क्या आपको ऐसा लगा कि दूसरे लोग आपके दिमाग में क्या चल रहा है, पढ़ सकते हैं?"),
|
170 |
-
("Have you felt like your thoughts were being repeated, stolen, or shared without your control?", "क्या आपको ऐसा लगा कि आपके विचार दोहराए जा रहे हैं, चुराए जा रहे हैं, या बिना आपकी अनुमति के फैलाए जा रहे हैं?"),
|
171 |
-
("Have you seen hidden messages meant especially for you in TV, newspapers, or surroundings?", "क्या आपको टीवी, अखबारों या आस-पास में अपने लिए छुपे हुए संदेश दिखाई दिए हैं?"),
|
172 |
-
("Have you believed that you have a special role, purpose, or identity that others don't have?", "क्या आपको लगा कि आपका कोई खास मकसद या पहचान है जो दूसरों के पास नहीं है?"),
|
173 |
-
("Have you talked to voices that other people couldn’t hear?", "क्या आपने ऐसी आवाजों से बात की है जिन्हें और कोई नहीं सुन पाया?"),
|
174 |
-
|
175 |
-
|
176 |
-
# Paranoia / Delusional Thoughts
|
177 |
-
("Have you felt suspicious or that things are 'off' in the past month?", "क्या आपको पिछले महीने से किसी बात पर शक हो रहा है या चीजें अजीब लग रही हैं?"),
|
178 |
-
("Have you felt others were watching or following you?", "क्या आपको लगता है कि कोई आपको देख या पीछा कर रहा है?"),
|
179 |
-
("Have you felt blamed or accused without reason recently?", "क्या आपको हाल ही में बार-बार बिना कारण दोषी ठहराया गया है?"),
|
180 |
-
|
181 |
-
# PTSD / Trauma-Related
|
182 |
-
("Have you had flashbacks or nightmares about a traumatic event?", "क्या आपने किसी दर्दनाक घटना के बारे में बार-बार बुरे सपने या फ्लैशबैक देखे हैं?"),
|
183 |
-
("Do you avoid reminders of a traumatic experience?", "क्या आप किसी दर्दनाक अनुभव की यादों से बचते हैं?"),
|
184 |
-
("Have you felt numb or detached since a traumatic event?", "क्या किसी दर्दनाक घटना के बाद से आप सुन्न या अलग-थलग महसूस कर रहे हैं?"),
|
185 |
-
("Have you been easily startled or constantly on edge since a traumatic event?", "क्या किसी दर्दनाक घटना के बाद से आप आसानी से चौंक जाते हैं या हमेशा सतर्क रहते हैं?"),
|
186 |
-
("Do you have difficulty sleeping or concentrating because of past trauma?", "क्या पुराने आघात के कारण आपको नींद लेने या ध्यान केंद्रित करने में कठिनाई होती है?"),
|
187 |
-
("Do you feel guilty, ashamed, or blame yourself for what happened?", "क्या आप उस घटना के लिए खुद को दोषी मानते हैं या शर्म महसूस करते हैं?"),
|
188 |
-
("Have your relationships or ability to trust others changed since the trauma?", "क्या आघात के बाद आपके रिश्ते या दूसरों पर विश्वास करने की क्षमता में बदलाव आया है?"),
|
189 |
-
|
190 |
-
# Dissociation / Perception / Identity
|
191 |
-
|
192 |
-
("Have you perceived time or your environment strangely recently?", "क्या आपने हाल ही में समय या अपने वातावरण को अजीब तरह से महसूस किया है?"),
|
193 |
-
("Have you felt disconnected from your body or self?", "क्या आपने खुद से या अपने शरीर से अलगाव महसूस किया है?"),
|
194 |
-
("Have you experienced changes in your appearance that others don't see?", "क्या आपने अपने रूप में ऐसे बदलाव देखे हैं जो अन्य नहीं देखते?"),
|
195 |
-
("Have you felt like you were watching yourself from outside your body?", "क्या आपने कभी ऐसा महसूस किया है कि आप अपने शरीर के बाहर से खुद को देख रहे हैं?"),
|
196 |
-
("Have familiar places or people ever felt unreal or dreamlike to you?", "क्या परिचित जगहें या लोग कभी आपको अवास्तविक या सपने जैसे लगे हैं?"),
|
197 |
-
("Have you had gaps in memory for daily events, personal information, or conversations?", "क्या आपको रोज़मर्रा की घटनाओं, व्यक्तिगत जानकारी या बातचीत में भूलने की समस्या रही है?"),
|
198 |
-
("Have you ever felt like different parts of you take control at different times?", "क्या आपको कभी ऐसा लगा है कि आपके भीतर के अलग-अलग हिस्से अलग-अलग समय पर नियंत्रण में आते हैं?"),
|
199 |
-
("Have you used a different name or identity without remembering doing so?", "क्या आपने कभी बिना याद किए कोई और नाम या पहचान अपनाई है?"),
|
200 |
-
|
201 |
-
# Sleep Disorders
|
202 |
-
("Have you had trouble falling asleep at least 3 nights a week?", "क्या आपको सप्ताह में 3 रातों से अधिक बार सोने में कठिनाई होती है?"),
|
203 |
-
("Have you frequently woken up at night for 2 weeks or more?", "क्या आप लगातार दो हफ्तों से रात में बार-बार जागते रहे हैं?"),
|
204 |
-
("Have you woken up too early without returning to sleep?", "क्या आप बहुत जल्दी जाग जाते हैं और फिर सो नहीं पाते?"),
|
205 |
-
("Have you overslept significantly for 2 or more weeks?", "क्या आप पिछले दो हफ्तों से सामान्य से ज्यादा सो रहे हैं?"),
|
206 |
-
("Have you had irregular sleep patterns recently?", "क्या आपकी नींद की आदतें हाल ही में असामान्य रही हैं?"),
|
207 |
-
("Have you had frequent disturbing dreams or night terrors?", "क्या आपको अक्सर डरावने सपने या रात को डर लगने का अनुभव होता है?"),
|
208 |
-
("Have you experienced sleep paralysis more than once in the past month?", "क्या आपको पिछले महीने में एक से अधिक बार स्लीप पैरालिसिस हुआ है?"),
|
209 |
-
("Have you had restlessness or discomfort in your legs at night?", "क्या आपको रात में पैरों में बेचैनी या असहजता महसूस होती है?"),
|
210 |
-
("Have you felt unusually sleepy during the day?", "क्या आप दिन के समय अत्यधिक नींद महसूस करते हैं या झपकी लेते हैं?"),
|
211 |
-
|
212 |
-
# Sexual Health / Concerns
|
213 |
-
|
214 |
-
("Has your sexual interest declined recently?", "क्या आपकी यौन इच्छा हाल ही में कम हो गई है?"),
|
215 |
-
("Has your sexual behavior increased significantly?", "क्या आपका यौन व्यवहार बहुत अधिक बढ़ गया है?"),
|
216 |
-
("Have you had issues with arousal or functioning for a month or more?", "क्या आपको पिछले एक महीने या उससे अधिक समय से यौन उत्तेजना या कार्य में कठिनाई हो रही है?"),
|
217 |
-
("Have you felt distressed about your sexual behavior or preferences?", "क्या आप अपने यौन व्यवहार या रुचियों को लेकर परेशान हैं?"),
|
218 |
-
("Have you experienced pain, discomfort, or fear during sexual activity?", "क्या आपको यौन गतिविधि के दौरान दर्द, असहजता या डर महसूस होता है?"),
|
219 |
-
("Have concerns about sexual performance affected your self-esteem or relationships?", "क्या यौन प्रदर्शन को लेकर चिंता ने आपके आत्मसम्मान या रिश्तों को प्रभावित किया है?"),
|
220 |
-
("Have you felt pressure or guilt related to sexual activity or expectations?", "क्या आपने यौन गतिविधि या अपेक्षाओं को लेकर दबाव या अपराधबोध महसूस किया है?"),
|
221 |
-
("Have you avoided intimacy due to trauma, fear, or body image concerns?", "क्या आपने आघात, डर या शरीर की छवि को लेकर चिंता के कारण अंतरंगता से परहेज किया है?"),
|
222 |
-
|
223 |
-
# Substance Use & Addiction
|
224 |
-
|
225 |
-
("Have you used alcohol or drugs in the past month?", "क्या आपने पिछले महीने में शराब या नशे का सेवन किया है?"),
|
226 |
-
("Have others criticized your substance use or expressed concern?", "क्या दूसरों ने आपके नशे के व्यवहार की आलोचना की है या चिंता जताई है?"),
|
227 |
-
("Have you felt withdrawal symptoms such as shaking, sweating, or irritability?", "क्या आपको नशा छोड़ने के कारण कंपकंपी, पसीना आना या चिड़चिड़ापन जैसे लक्षण महसूस हुए हैं?"),
|
228 |
-
("Have you used substances first thing in the morning more than once?", "क्या आपने सुबह उठते ही कई बार नशा किया है?"),
|
229 |
-
("Have you tried to cut down or stop using but found it difficult?", "क्या आपने नशा कम करने या छोड़ने की कोशिश की है लेकिन सफल नहीं हो पाए हैं?"),
|
230 |
-
("Have you spent a lot of time getting, using, or recovering from the effects of substances?", "क्या आप नशा प्राप्त करने, सेवन करने या उसके असर से उबरने में बहुत समय खर्च करते हैं?"),
|
231 |
-
("Have your work, studies, or relationships suffered due to your substance use?", "क्या आपके काम, पढ़ाई या रिश्तों पर नशे के कारण नकारात्मक असर पड़ा है?"),
|
232 |
-
("Do you often crave or feel a strong urge to use substances?", "क्या आपको अक्सर नशे की तीव्र इच्छा या लालसा महसूस होती है?"),
|
233 |
-
("Have you ever used more than you intended or for longer than planned?", "क्या आपने कभी योजना से अधिक या लंबे समय तक नशे का सेवन किया है?"),
|
234 |
-
|
235 |
-
# Eating Disorder Risk
|
236 |
-
|
237 |
-
("Have you felt guilty or out of control after eating?", "क्या आप खाने के बाद अपराधबोध या नियंत्रण खोने जैसा महसूस करते हैं?"),
|
238 |
-
("Have you avoided food or meals to lose weight?", "क्या आपने वजन कम करने के लिए जानबूझकर भोजन टाला है?"),
|
239 |
-
("Have others commented on your eating or body image habits?", "क्या दूसरों ने आपके खाने या शरीर की छवि के बारे में टिप्पणी की है?"),
|
240 |
-
("Do you often feel unhappy with your body size, shape, or weight?", "क्या आप अक्सर अपने शरीर के आकार, वजन या रूप को लेकर असंतुष्ट महसूस करते हैं?"),
|
241 |
-
("Have you engaged in vomiting, over-exercising, or laxative use to control your weight?", "क्या आपने वजन नियंत्रित करने के लिए उल्टी करने, अत्यधिक व्यायाम या विरेचक (लैक्सेटिव) लेने का सहारा लिया है?"),
|
242 |
-
("Do you frequently binge eat — consuming large amounts of food in a short time?", "क्या आप अक्सर बहुत अधिक मात्रा में खाना खाते हैं, जिसे आप नियंत्रित नहीं कर पाते?"),
|
243 |
-
("Do you feel anxious, ashamed, or secretive about your eating habits?", "क्या आप अपनी खाने की आदतों को लेकर चिंतित, शर्मिंदा या छुपाने वाले व्यवहार करते हैं?"),
|
244 |
-
("Have your eating or body image concerns affected your daily life or health?", "क्या आपकी खाने या शरीर की छवि को लेकर चिंता ने आपके रोज़मर्रा के जीवन या स्वास्थ्य को प्रभावित किया है?"),
|
245 |
-
|
246 |
-
# Adult Attention-Deficit/Hyperactivity Disorder
|
247 |
|
248 |
("Do you often have difficulty staying focused during tasks or conversations?", "क्या आपको कार्य करते समय या बातचीत के दौरान ध्यान केंद्रित करने में कठिनाई होती है?"),
|
249 |
("Do you frequently lose items or forget daily responsibilities (e.g., appointments, bills)?", "क्या आप अक्सर चीजें खो देते हैं या दैनिक ज़िम्मेदारियाँ भूल जाते हैं (जैसे अपॉइंटमेंट, बिल)?"),
|
@@ -252,7 +74,7 @@ questions = [
|
|
252 |
("Do you often interrupt others or speak out without waiting your turn?", "क्या आप अक्सर दूसरों की बात काटते हैं या बिना रुके बोल पड़ते हैं?"),
|
253 |
("Do you procrastinate or avoid tasks that require sustained mental effort?", "क्या आप ऐसे कार्यों को टालते हैं जिनमें लंबे समय तक ध्यान केंद्रित करना होता है?"),
|
254 |
("Have these difficulties been present since childhood and continue to affect your work or relationships?", "क्या ये कठिनाइयाँ बचपन से रही हैं और अब भी आपके काम या रिश्तों को प्रभावित कर रही हैं?"),
|
255 |
-
|
256 |
]
|
257 |
|
258 |
|
|
|
16 |
trust_remote_code=True # Required for llama3 models
|
17 |
)
|
18 |
|
19 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
20 |
+
|
21 |
model = AutoModelForCausalLM.from_pretrained(
|
22 |
model_name,
|
23 |
token=hf_token,
|
24 |
trust_remote_code=True,
|
25 |
+
torch_dtype=torch.float16 if device=="cuda" else torch.float32,
|
26 |
+
device_map="auto" if device=="cuda" else None
|
27 |
+
).to(device)
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
|
32 |
# --- Define llm generation function ---
|
33 |
def llm(prompt, max_new_tokens=1000, temperature=0.3, do_sample=True):
|
|
|
64 |
("Have you experienced anxiety symptoms like palpitations, choking, or dry mouth for the past 6 months?", "क्या आपको पिछले 6 महीनों से घबराहट जैसे लक्षण (जैसे धड़कन तेज होना, गला बंद लगना, मुंह सूखना) महसूस हुए हैं?"),
|
65 |
("Have these anxiety symptoms occurred in most situations over the past 6 months?", "क्या ये घबराहट के लक्षण पिछले 6 महीनों में ज्यादातर स्थितियों में हुए हैं?"),
|
66 |
("Have you had difficulty concentrating or thinking clearly for at least 2 weeks?", "क्या आपको पिछले 2 हफ्तों से ध्यान केंद्रित करने या स्पष्ट रूप से सोचने में कठिनाई हुई है?"),
|
67 |
+
|
68 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
("Do you often have difficulty staying focused during tasks or conversations?", "क्या आपको कार्य करते समय या बातचीत के दौरान ध्यान केंद्रित करने में कठिनाई होती है?"),
|
71 |
("Do you frequently lose items or forget daily responsibilities (e.g., appointments, bills)?", "क्या आप अक्सर चीजें खो देते हैं या दैनिक ज़िम्मेदारियाँ भूल जाते हैं (जैसे अपॉइंटमेंट, बिल)?"),
|
|
|
74 |
("Do you often interrupt others or speak out without waiting your turn?", "क्या आप अक्सर दूसरों की बात काटते हैं या बिना रुके बोल पड़ते हैं?"),
|
75 |
("Do you procrastinate or avoid tasks that require sustained mental effort?", "क्या आप ऐसे कार्यों को टालते हैं जिनमें लंबे समय तक ध्यान केंद्रित करना होता है?"),
|
76 |
("Have these difficulties been present since childhood and continue to affect your work or relationships?", "क्या ये कठिनाइयाँ बचपन से रही हैं और अब भी आपके काम या रिश्तों को प्रभावित कर रही हैं?"),
|
77 |
+
|
78 |
]
|
79 |
|
80 |
|