ManjotSingh commited on
Commit
c38438f
·
verified ·
1 Parent(s): fc34500

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -13
README.md CHANGED
@@ -1,13 +1,61 @@
1
- ---
2
- title: LLMchatbotAPP
3
- emoji: 💬
4
- colorFrom: yellow
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 4.36.1
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- ---
12
-
13
- An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # North Indian Diet Expert Chatbot
2
+ ### Overview
3
+ The Retrieval-Augmented Generation (RAG) LLM Chatbot is designed to provide accurate and contextually relevant responses by combining retrieval-based methods with generation-based models. This chatbot leverages external knowledge from a PDF document to enhance its responses, making it a powerful tool for domain-specific information retrieval and conversation. In this project, the chatbot specializes in providing dietary advice related to North Indian cuisine.
4
+
5
+ ### Features
6
+ 1. Contextually Relevant Responses: Combines retrieval-based and generation-based approaches to provide accurate responses.
7
+ 2. Knowledge Integration: Uses external documents to supplement the chatbot's responses with up-to-date and domain-specific information.
8
+ 3. Interactive User Interface: Utilizes Gradio to provide a user-friendly interaction platform.
9
+ 4. North Indian Diet Expertise: Provides dietary advice, meal plans, healthy recipes, and nutritional information specific to North Indian cuisine.
10
+
11
+ ### Setup Instructions
12
+ Create a requirements.txt file with the following content:
13
+
14
+ gradio
15
+ huggingface_hub
16
+ PyMuPDF
17
+ sentence-transformers
18
+ faiss-cpu
19
+
20
+ ### Prepare the PDF
21
+
22
+ Ensure you have a PDF file named North_Indian_Diet.pdf that contains information about the North Indian diet, recipes, nutrition, etc. Place this file in the same directory as your app.py.
23
+
24
+ ### Usage
25
+
26
+
27
+ Example Interactions
28
+
29
+ Healthy North Indian Breakfast
30
+ User: Can you suggest a healthy North Indian breakfast?
31
+
32
+ Nutritional Benefits of Chickpeas
33
+ User: What are the nutritional benefits of chickpeas?
34
+
35
+ Balanced North Indian Meal Plan
36
+ User: How can I plan a balanced North Indian meal?
37
+
38
+ ### Customization
39
+ System Message
40
+ Modify the system message in the respond function to change the chatbot's expertise area.
41
+
42
+ system_message = "You are a North Indian diet expert. You provide dietary advice, suggest meal plans, and answer questions related to North Indian cuisine and nutrition. Feel free to ask about healthy recipes, nutritional benefits of foods, or meal planning tips."
43
+
44
+ Response Parameters
45
+ Adjust the max_tokens, temperature, and top_p parameters to fine-tune the chatbot's responses.
46
+
47
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
48
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
49
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
50
+
51
+ Adding More Examples
52
+ Include more example questions in the examples section to guide users on how to interact with the chatbot.
53
+
54
+ examples=[
55
+ ["Can you suggest a healthy North Indian breakfast?"],
56
+ ["What are the nutritional benefits of chickpeas?"],
57
+ ["How can I plan a balanced North Indian meal?"]
58
+ ]
59
+
60
+ ### Contributing
61
+ Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.