ManjotSingh commited on
Commit
90880cd
1 Parent(s): fa91dc7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -65
README.md CHANGED
@@ -3,73 +3,10 @@ title: Gradio Chatbot
3
  emoji: 💬
4
  colorFrom: yellow
5
  colorTo: purple
6
- sdk_version: 4.36.1
7
  app_file: app.py
8
  pinned: false
9
 
10
  ---
11
 
12
- 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).
13
-
14
-
15
- # North Indian Diet Expert Chatbot
16
- ### Overview
17
- 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.
18
-
19
- ### Features
20
- 1. Contextually Relevant Responses: Combines retrieval-based and generation-based approaches to provide accurate responses.
21
- 2. Knowledge Integration: Uses external documents to supplement the chatbot's responses with up-to-date and domain-specific information.
22
- 3. Interactive User Interface: Utilizes Gradio to provide a user-friendly interaction platform.
23
- 4. North Indian Diet Expertise: Provides dietary advice, meal plans, healthy recipes, and nutritional information specific to North Indian cuisine.
24
-
25
- ### Setup Instructions
26
- Create a requirements.txt file with the following content:
27
-
28
- gradio
29
- huggingface_hub
30
- PyMuPDF
31
- sentence-transformers
32
- faiss-cpu
33
-
34
- ### Prepare the PDF
35
-
36
- 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.
37
-
38
- ### Usage
39
-
40
-
41
- Example Interactions
42
-
43
- Healthy North Indian Breakfast
44
- User: Can you suggest a healthy North Indian breakfast?
45
-
46
- Nutritional Benefits of Chickpeas
47
- User: What are the nutritional benefits of chickpeas?
48
-
49
- Balanced North Indian Meal Plan
50
- User: How can I plan a balanced North Indian meal?
51
-
52
- ### Customization
53
- System Message
54
- Modify the system message in the respond function to change the chatbot's expertise area.
55
-
56
- 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."
57
-
58
- Response Parameters
59
- Adjust the max_tokens, temperature, and top_p parameters to fine-tune the chatbot's responses.
60
-
61
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
62
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
63
- gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
64
-
65
- Adding More Examples
66
- Include more example questions in the examples section to guide users on how to interact with the chatbot.
67
-
68
- examples=[
69
- ["Can you suggest a healthy North Indian breakfast?"],
70
- ["What are the nutritional benefits of chickpeas?"],
71
- ["How can I plan a balanced North Indian meal?"]
72
- ]
73
-
74
- ### Contributing
75
- Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.
 
3
  emoji: 💬
4
  colorFrom: yellow
5
  colorTo: purple
6
+ sdk_version: 4.38.1
7
  app_file: app.py
8
  pinned: false
9
 
10
  ---
11
 
12
+ 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).