clear outputs
This commit is contained in:
@@ -10,30 +10,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": null,
|
||||||
"id": "b7bd1bd7-19d9-4c4b-bc4b-9bc9cca8bd0f",
|
"id": "b7bd1bd7-19d9-4c4b-bc4b-9bc9cca8bd0f",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Requirement already satisfied: finnhub-python in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (2.4.24)\n",
|
|
||||||
"Requirement already satisfied: requests>=2.22.0 in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (from finnhub-python) (2.32.3)\n",
|
|
||||||
"Requirement already satisfied: charset_normalizer<4,>=2 in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (from requests>=2.22.0->finnhub-python) (3.4.2)\n",
|
|
||||||
"Requirement already satisfied: idna<4,>=2.5 in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (from requests>=2.22.0->finnhub-python) (3.10)\n",
|
|
||||||
"Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (from requests>=2.22.0->finnhub-python) (2.4.0)\n",
|
|
||||||
"Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/envs/llms/lib/python3.11/site-packages (from requests>=2.22.0->finnhub-python) (2025.4.26)\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"!pip install finnhub-python"
|
"!pip install finnhub-python"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"id": "8b50bbe2-c0b1-49c3-9a5c-1ba7efa2bcb4",
|
"id": "8b50bbe2-c0b1-49c3-9a5c-1ba7efa2bcb4",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -52,18 +39,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"id": "ba0ddc1a-c775-4ed3-9531-ed0c5799e87f",
|
"id": "ba0ddc1a-c775-4ed3-9531-ed0c5799e87f",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:23:48,810 [INFO] Logger initialized!\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"import logging\n",
|
"import logging\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -80,19 +59,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": null,
|
||||||
"id": "747e8786-9da8-4342-b6c9-f5f69c2e22ae",
|
"id": "747e8786-9da8-4342-b6c9-f5f69c2e22ae",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:23:48,813 [INFO] OpenAI API Key exists and begins sk-proj-\n",
|
|
||||||
"2025-08-30 15:23:48,814 [INFO] FINNHUB_API_KEY exists!\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Initialization\n",
|
"# Initialization\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -118,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": null,
|
||||||
"id": "ee3aaa9a-5495-42fd-a382-803fbfa92eaf",
|
"id": "ee3aaa9a-5495-42fd-a382-803fbfa92eaf",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -204,7 +174,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"id": "fdf1a2b0-07be-47a0-9ce3-14d21b48c8f2",
|
"id": "fdf1a2b0-07be-47a0-9ce3-14d21b48c8f2",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -226,7 +196,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": null,
|
||||||
"id": "12d912fc-91fb-469e-9572-2876a099f5aa",
|
"id": "12d912fc-91fb-469e-9572-2876a099f5aa",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -245,7 +215,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 8,
|
"execution_count": null,
|
||||||
"id": "61a2a15d-b559-4844-b377-6bd5cb4949f6",
|
"id": "61a2a15d-b559-4844-b377-6bd5cb4949f6",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -287,7 +257,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 9,
|
"execution_count": null,
|
||||||
"id": "173010e3-dfef-4611-8b68-d11256bd5fba",
|
"id": "173010e3-dfef-4611-8b68-d11256bd5fba",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -314,7 +284,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": null,
|
||||||
"id": "448bb4ce-8e86-4ceb-ab52-96bddfd33337",
|
"id": "448bb4ce-8e86-4ceb-ab52-96bddfd33337",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -409,7 +379,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": null,
|
||||||
"id": "9df7b74e-fec8-4e75-92a9-31acc75e6e97",
|
"id": "9df7b74e-fec8-4e75-92a9-31acc75e6e97",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -437,7 +407,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": null,
|
||||||
"id": "cfeeb200-3f30-4855-82b9-cc8b2a950f80",
|
"id": "cfeeb200-3f30-4855-82b9-cc8b2a950f80",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -483,7 +453,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": null,
|
||||||
"id": "3724d92a-4515-4267-af6f-2c1ec2b6ed36",
|
"id": "3724d92a-4515-4267-af6f-2c1ec2b6ed36",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -508,7 +478,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 14,
|
"execution_count": null,
|
||||||
"id": "62f5d477-6626-428f-b8eb-d763e736ef5b",
|
"id": "62f5d477-6626-428f-b8eb-d763e736ef5b",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -573,7 +543,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 15,
|
"execution_count": null,
|
||||||
"id": "5150ecb6-e3f1-46dc-94fa-2a9abe5165f6",
|
"id": "5150ecb6-e3f1-46dc-94fa-2a9abe5165f6",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -610,7 +580,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 16,
|
"execution_count": null,
|
||||||
"id": "26dd7375-626f-4235-b4a2-f1926f62cc5e",
|
"id": "26dd7375-626f-4235-b4a2-f1926f62cc5e",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -657,7 +627,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 17,
|
"execution_count": null,
|
||||||
"id": "5bd1aa28-119c-4c7a-bdc0-161a582ab1cc",
|
"id": "5bd1aa28-119c-4c7a-bdc0-161a582ab1cc",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -682,7 +652,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 18,
|
"execution_count": null,
|
||||||
"id": "fbe8ef6c-2d88-43a2-94dc-70b507fe9cd2",
|
"id": "fbe8ef6c-2d88-43a2-94dc-70b507fe9cd2",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -761,7 +731,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 19,
|
"execution_count": null,
|
||||||
"id": "9eaeae75-d68f-4160-a26e-c13e40cf756b",
|
"id": "9eaeae75-d68f-4160-a26e-c13e40cf756b",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -797,7 +767,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 20,
|
"execution_count": null,
|
||||||
"id": "bdca8679-935f-4e7f-97e6-e71a4d4f228c",
|
"id": "bdca8679-935f-4e7f-97e6-e71a4d4f228c",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -831,7 +801,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 21,
|
"execution_count": null,
|
||||||
"id": "86f76f57-76c4-4dc7-94a8-cfe7816a39f1",
|
"id": "86f76f57-76c4-4dc7-94a8-cfe7816a39f1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -861,7 +831,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 22,
|
"execution_count": null,
|
||||||
"id": "ce9b0744-9c78-408d-b9df-9f6fd9ed78cf",
|
"id": "ce9b0744-9c78-408d-b9df-9f6fd9ed78cf",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -949,86 +919,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 23,
|
"execution_count": null,
|
||||||
"id": "f4be8a71-b19e-4c2f-80df-f59ff2661f14",
|
"id": "f4be8a71-b19e-4c2f-80df-f59ff2661f14",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:23:51,219 [INFO] HTTP Request: GET http://127.0.0.1:7860/gradio_api/startup-events \"HTTP/1.1 200 OK\"\n",
|
|
||||||
"2025-08-30 15:23:51,226 [INFO] HTTP Request: HEAD http://127.0.0.1:7860/ \"HTTP/1.1 200 OK\"\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"* Running on local URL: http://127.0.0.1:7860\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:23:52,534 [INFO] HTTP Request: GET https://api.gradio.app/pkg-version \"HTTP/1.1 200 OK\"\n",
|
|
||||||
"2025-08-30 15:23:52,536 [INFO] HTTP Request: GET https://api.gradio.app/v3/tunnel-request \"HTTP/1.1 200 OK\"\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"* Running on public URL: https://8532ed0b314508005c.gradio.live\n",
|
|
||||||
"\n",
|
|
||||||
"This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:23:56,230 [INFO] HTTP Request: HEAD https://8532ed0b314508005c.gradio.live \"HTTP/1.1 200 OK\"\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/html": [
|
|
||||||
"<div><iframe src=\"https://8532ed0b314508005c.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": []
|
|
||||||
},
|
|
||||||
"execution_count": 23,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"2025-08-30 15:26:10,184 [INFO] \n",
|
|
||||||
"Messages:\n",
|
|
||||||
"{'role': 'user', 'content': 'Tell me the performance of eli lilly'}\n",
|
|
||||||
"\n",
|
|
||||||
"2025-08-30 15:26:11,569 [INFO] HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n",
|
|
||||||
"2025-08-30 15:26:11,592 [INFO] Executing tool: get_stock_quote with args: {'symbol': 'LLY'}\n",
|
|
||||||
"2025-08-30 15:26:11,594 [INFO] Tool get_stock_quote called for LLY\n",
|
|
||||||
"2025-08-30 15:26:12,419 [INFO] Executing tool: get_company_financials with args: {'symbol': 'LLY'}\n",
|
|
||||||
"2025-08-30 15:26:12,420 [INFO] Tool get_company_financials called for LLY\n",
|
|
||||||
"2025-08-30 15:26:14,097 [INFO] HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"gr.ChatInterface(fn=chat, type=\"messages\", title=\"TickerBot\", description=\"Ask about stock prices, company financials and market news!\").launch(share=True)"
|
"gr.ChatInterface(fn=chat, type=\"messages\", title=\"TickerBot\", description=\"Ask about stock prices, company financials and market news!\").launch(share=True)"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user