Merge branch 'main' of https://huggingface.co/spaces/thrag/rag-demo-1
Browse files
app.py
CHANGED
@@ -176,7 +176,7 @@ def ask_query(model, apiKey, query, accessList):
|
|
176 |
if "Chicken recipes" in accessList:
|
177 |
tools.append(list_chicken_recipes_tool)
|
178 |
|
179 |
-
if "
|
180 |
tools.append(list_dessert_recipes_tool)
|
181 |
|
182 |
print('Chicken recipes selected:')
|
@@ -234,7 +234,7 @@ with gr.Blocks() as demo:
|
|
234 |
modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label="Model to use")
|
235 |
openAIKey = gr.Textbox(placeholder="Paste your OpenAI API Key Here", label="OpenAI API Key")
|
236 |
inp = gr.Textbox(placeholder="Type your question here...", label="Question")
|
237 |
-
accessCG = gr.CheckboxGroup(["Chicken recipes", "
|
238 |
btn = gr.Button("Run")
|
239 |
examples = ["Can you show tell me what ingredients I need for the first baked chicken recipe?",
|
240 |
"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? ",
|
|
|
176 |
if "Chicken recipes" in accessList:
|
177 |
tools.append(list_chicken_recipes_tool)
|
178 |
|
179 |
+
if "Dessert recipes" in accessList:
|
180 |
tools.append(list_dessert_recipes_tool)
|
181 |
|
182 |
print('Chicken recipes selected:')
|
|
|
234 |
modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label="Model to use")
|
235 |
openAIKey = gr.Textbox(placeholder="Paste your OpenAI API Key Here", label="OpenAI API Key")
|
236 |
inp = gr.Textbox(placeholder="Type your question here...", label="Question")
|
237 |
+
accessCG = gr.CheckboxGroup(["Chicken recipes", "Dessert recipes"], value=["Chicken recipes", "Dessert recipes"], label="Access List", info="The recipes below are what you have access to, deselect ones and ask specific questions to see how LLM cannot access them.")
|
238 |
btn = gr.Button("Run")
|
239 |
examples = ["Can you show tell me what ingredients I need for the first baked chicken recipe?",
|
240 |
"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? ",
|