Spaces:
Sleeping
Sleeping
Rohankumar31
commited on
Commit
•
0c83e83
1
Parent(s):
2ebc4da
Upload 3 files
Browse files
Data.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
A well-balanced diet and appropriate exercise regimen can greatly benefit individuals with a predominant Vata constitution or experiencing Vata imbalances. Vata is characterized by qualities like dryness, coldness, lightness, and mobility, and to counterbalance these qualities, it's essential to focus on nourishing, grounding, and warming foods. In terms of diet, Vata individuals should prioritize warm, cooked, and moist foods, as they help counteract Vata's inherent dryness and coldness. Opt for nourishing grains like rice, quinoa, and oats, and incorporate cooked vegetables such as sweet potatoes, carrots, and zucchini. Legumes like mung beans and well-cooked lentils provide a good source of protein while being easy to digest. Healthy fats from sources like ghee (clarified butter), olive oil, and avocados can help lubricate and moisturize the body, addressing Vata's dry tendencies. Include a variety of warming spices like ginger, cinnamon, and cardamom in your meals to stimulate digestion and enhance flavor.
|
2 |
+
|
3 |
+
Fruits that are naturally sweet and juicy, such as ripe bananas, mangoes, and cooked apples, can be enjoyed in moderation. To maintain hydration, opt for warm herbal teas like ginger tea or licorice tea. Stay well-hydrated throughout the day, and consider sipping warm water between meals. It's advisable to minimize or avoid cold or raw foods, as they can exacerbate Vata imbalances. Also, limit caffeine and stimulants, as they can contribute to restlessness and anxiety.
|
4 |
+
|
5 |
+
In terms of exercise, Vata individuals benefit from activities that are grounding, gentle, and promote stability. Yoga, especially Hatha or restorative yoga, can be highly beneficial, as it combines physical postures with breath control and meditation to calm the mind and promote flexibility and strength. Tai Chi and Qigong are other gentle practices that can help balance Vata energy by focusing on slow, flowing movements and deep breathing. Strength training, when approached mindfully and without excessive intensity, can help build stability and muscle mass.
|
6 |
+
|
7 |
+
Walking in nature, especially in serene environments, can be both grounding and soothing for Vata types. However, it's important to avoid excessive cardio workouts, which can exacerbate Vata's tendencies towards restlessness and depletion. Vata individuals should listen to their bodies and prioritize consistency and moderation in their exercise routine rather than pushing themselves to extremes.
|
8 |
+
|
9 |
+
In conclusion, for individuals with a Vata constitution or experiencing Vata imbalances, a diet rich in warm, cooked, and nourishing foods, along with mindful exercise practices that promote stability and calmness, can help maintain balance and well-being. It's essential to personalize these recommendations based on individual needs and consult with a healthcare provider or Ayurvedic practitioner for tailored guidance, especially if specific health concerns or imbalances need to be addressed. Balancing Vata requires a holistic approach that takes into account not only diet and exercise but also lifestyle, stress management, and self-care practices that promote inner harmony and vitality.
|
main.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import model
|
3 |
+
def chatbot(question):
|
4 |
+
# Provide a context or passage where the answer can be found
|
5 |
+
with open(r"Data.txt", "r", encoding="utf-8") as file:
|
6 |
+
context = file.read()
|
7 |
+
# Use the question-answering model to find the answer
|
8 |
+
answer = model.qa_pipeline(question=question, context=context)
|
9 |
+
return answer
|
10 |
+
def prints(questions):
|
11 |
+
response = chatbot(questions)
|
12 |
+
# print(f"Question: {question}")
|
13 |
+
# print(f"Answer: {response['answer']}")
|
14 |
+
# print(f"Confidence: {response['score']:.4f}")
|
15 |
+
# print()
|
16 |
+
return response['answer']
|
17 |
+
# result = prints(stream.query)
|
18 |
+
# print(result)
|
19 |
+
# stream.receive_data(result)
|
model.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import transformers
|
3 |
+
import torch
|
4 |
+
import torch.nn as nn
|
5 |
+
import tensorflow as tf
|
6 |
+
from transformers import TFGPT2LMHeadModel ,GPT2Tokenizer, BitsAndBytesConfig
|
7 |
+
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
8 |
+
model = TFGPT2LMHeadModel.from_pretrained('gpt2',pad_token_id = tokenizer.eos_token_id)
|
9 |
+
def generate_text(inp):
|
10 |
+
input_ids = tokenizer.encode(inp,return_tensors = 'tf')
|
11 |
+
beam_output = model.generate(input_ids, max_length = 100,num_beams = 5, no_repeat_ngram_size = 2, early_stopping = True)
|
12 |
+
output = tokenizer.decode(beam_output[0],skip_special_tokens = True, clean_up_tokenization_spaces = True)
|
13 |
+
return ".".join(output.split(".")[:-1]) + "."
|
14 |
+
qa_pipeline = pipeline("question-answering", model=model)
|