Sophia Yang commited on
Commit
4c1d4df
1 Parent(s): 91fca6d

add instructions and widget box

Browse files
Files changed (1) hide show
  1. LangChain_QA_Panel_App.ipynb +22 -3
LangChain_QA_Panel_App.ipynb CHANGED
@@ -191,10 +191,22 @@
191
  "source": [
192
  "qa_interactive = pn.panel(\n",
193
  " pn.bind(qa_result, run_button),\n",
194
- " loading_indicator=True\n",
195
  ")"
196
  ]
197
  },
 
 
 
 
 
 
 
 
 
 
 
 
198
  {
199
  "cell_type": "code",
200
  "execution_count": null,
@@ -206,9 +218,16 @@
206
  "source": [
207
  "# layout\n",
208
  "pn.Column(\n",
209
- " \"## \\U0001F60A! Question Answering with your PDF file\",\n",
 
 
 
 
 
 
 
210
  " pn.Row(file_input,openaikey),\n",
211
- " qa_interactive,\n",
212
  " widgets\n",
213
  "\n",
214
  ").servable()"
 
191
  "source": [
192
  "qa_interactive = pn.panel(\n",
193
  " pn.bind(qa_result, run_button),\n",
194
+ " loading_indicator=True,\n",
195
  ")"
196
  ]
197
  },
198
+ {
199
+ "cell_type": "code",
200
+ "execution_count": null,
201
+ "id": "228e2b42-b1ed-43af-b923-031a70241ab0",
202
+ "metadata": {
203
+ "tags": []
204
+ },
205
+ "outputs": [],
206
+ "source": [
207
+ "output = pn.WidgetBox('*Output will show up here:*', qa_interactive, width=630, scroll=True)"
208
+ ]
209
+ },
210
  {
211
  "cell_type": "code",
212
  "execution_count": null,
 
218
  "source": [
219
  "# layout\n",
220
  "pn.Column(\n",
221
+ " pn.pane.Markdown(\"\"\"\n",
222
+ " ## \\U0001F60A! Question Answering with your PDF file\n",
223
+ " \n",
224
+ " Step 1: Upload a PDF file \\n\n",
225
+ " Step 2: Enter your OpenAI API key. This costs $$. You will need to set up billing info at [OpenAI](https://platform.openai.com/account). \\n\n",
226
+ " Step 3: Type your question at the bottom and click \"Run\" \\n\n",
227
+ " \n",
228
+ " \"\"\"),\n",
229
  " pn.Row(file_input,openaikey),\n",
230
+ " output,\n",
231
  " widgets\n",
232
  "\n",
233
  ").servable()"