thrag commited on
Commit
ed5d197
β€’
1 Parent(s): 8f7d4f2

Tweaking to go public

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. demo-tools-1.ipynb +7 -7
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: demo 1
3
  emoji: πŸ†
4
  colorFrom: purple
5
  colorTo: indigo
 
1
  ---
2
+ title: demo 1 segregation of data with langchain tools
3
  emoji: πŸ†
4
  colorFrom: purple
5
  colorTo: indigo
demo-tools-1.ipynb CHANGED
@@ -281,14 +281,14 @@
281
  },
282
  {
283
  "cell_type": "code",
284
- "execution_count": 118,
285
  "metadata": {},
286
  "outputs": [
287
  {
288
  "name": "stdout",
289
  "output_type": "stream",
290
  "text": [
291
- "Running on local URL: http://127.0.0.1:7905\n",
292
  "\n",
293
  "To create a public link, set `share=True` in `launch()`.\n"
294
  ]
@@ -296,7 +296,7 @@
296
  {
297
  "data": {
298
  "text/html": [
299
- "<div><iframe src=\"http://127.0.0.1:7905/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
300
  ],
301
  "text/plain": [
302
  "<IPython.core.display.HTML object>"
@@ -309,7 +309,7 @@
309
  "data": {
310
  "text/plain": []
311
  },
312
- "execution_count": 118,
313
  "metadata": {},
314
  "output_type": "execute_result"
315
  }
@@ -321,15 +321,15 @@
321
  " \n",
322
  " with gr.Row():\n",
323
  " with gr.Column():\n",
324
- " headerMsg = \"This demo shows the <b>Segregation of Data</b> \"\n",
325
  " headerMsg += \"the intent of this demo is to show how at LLM uses Tools to fetch information from two specific recipe lists. And how if a user does \" \n",
326
- " headerMsg += \"not have access to a given recipe then the LLM will not be able to pull information from it.\" \n",
327
  " gr.Markdown(headerMsg)\n",
328
  " \n",
329
  " modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label=\"Model to use\")\n",
330
  " openAIKey = gr.Textbox(placeholder=\"Paste your OpenAI API Key Here\", label=\"OpenAI API Key\") \n",
331
  " inp = gr.Textbox(placeholder=\"Type your question here...\", label=\"Question\") \n",
332
- " accessCG = gr.CheckboxGroup([\"Chicken recipes\", \"Desert recipes\"], label=\"Access List\", info=\"The recipes below are what you have access to\")\n",
333
  " btn = gr.Button(\"Run\") \n",
334
  " examples = [\"Can you show tell me what ingredients I need for the first baked chicken recipe?\",\n",
335
  " \"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? \",\n",
 
281
  },
282
  {
283
  "cell_type": "code",
284
+ "execution_count": 119,
285
  "metadata": {},
286
  "outputs": [
287
  {
288
  "name": "stdout",
289
  "output_type": "stream",
290
  "text": [
291
+ "Running on local URL: http://127.0.0.1:7906\n",
292
  "\n",
293
  "To create a public link, set `share=True` in `launch()`.\n"
294
  ]
 
296
  {
297
  "data": {
298
  "text/html": [
299
+ "<div><iframe src=\"http://127.0.0.1:7906/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
300
  ],
301
  "text/plain": [
302
  "<IPython.core.display.HTML object>"
 
309
  "data": {
310
  "text/plain": []
311
  },
312
+ "execution_count": 119,
313
  "metadata": {},
314
  "output_type": "execute_result"
315
  }
 
321
  " \n",
322
  " with gr.Row():\n",
323
  " with gr.Column():\n",
324
+ " headerMsg = \"This demo shows using LangChain Tools to <b>segregate of data</b> \"\n",
325
  " headerMsg += \"the intent of this demo is to show how at LLM uses Tools to fetch information from two specific recipe lists. And how if a user does \" \n",
326
+ " headerMsg += \"not have access to a given recipe then the LLM will not be able to pull information from it. \" \n",
327
  " gr.Markdown(headerMsg)\n",
328
  " \n",
329
  " modelDD = gr.Dropdown(['gpt-3.5-turbo', 'gpt-4'], value='gpt-3.5-turbo', label=\"Model to use\")\n",
330
  " openAIKey = gr.Textbox(placeholder=\"Paste your OpenAI API Key Here\", label=\"OpenAI API Key\") \n",
331
  " inp = gr.Textbox(placeholder=\"Type your question here...\", label=\"Question\") \n",
332
+ " accessCG = gr.CheckboxGroup([\"Chicken recipes\", \"Desert recipes\"], value=[\"Chicken recipes\", \"Desert 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.\")\n",
333
  " btn = gr.Button(\"Run\") \n",
334
  " examples = [\"Can you show tell me what ingredients I need for the first baked chicken recipe?\",\n",
335
  " \"I have 15 guests coming to visit, if I make the 'Chocolate Snack Cake' recipe will there be enough? \",\n",