Clean cell outputs
This commit is contained in:
@@ -38,23 +38,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": null,
|
||||||
"id": "4f672e1c-87e9-4865-b760-370fa605e614",
|
"id": "4f672e1c-87e9-4865-b760-370fa605e614",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"OpenAI API Key exists and begins sk-proj-\n",
|
|
||||||
"Anthropic API Key not set (and this is optional)\n",
|
|
||||||
"Google API Key not set (and this is optional)\n",
|
|
||||||
"Grok API Key not set (and this is optional)\n",
|
|
||||||
"Groq API Key not set (and this is optional)\n",
|
|
||||||
"OpenRouter API Key not set (and this is optional)\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"load_dotenv(override=True)\n",
|
"load_dotenv(override=True)\n",
|
||||||
"openai_api_key = os.getenv('OPENAI_API_KEY')\n",
|
"openai_api_key = os.getenv('OPENAI_API_KEY')\n",
|
||||||
@@ -343,21 +330,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 16,
|
"execution_count": null,
|
||||||
"id": "ea69108f-e4ca-4326-89fe-97c5748c0e79",
|
"id": "ea69108f-e4ca-4326-89fe-97c5748c0e79",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Missing docstring → module: \n",
|
|
||||||
"Missing docstring → function: def add(x, y):\n",
|
|
||||||
"Missing docstring → class: class Counter:\n",
|
|
||||||
"Missing docstring → function: def inc(self):\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"## Quick Test ##\n",
|
"## Quick Test ##\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -446,86 +422,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 19,
|
"execution_count": null,
|
||||||
"id": "d00cf4b7-773d-49cb-8262-9d11d787ee10",
|
"id": "d00cf4b7-773d-49cb-8262-9d11d787ee10",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"=== Generated Docstrings ===\n",
|
|
||||||
"- module: module demo\n",
|
|
||||||
" Adds two numbers together.\n",
|
|
||||||
"\n",
|
|
||||||
"This function takes two numeric inputs and returns their sum.\n",
|
|
||||||
"It supports both integers and floats.\n",
|
|
||||||
"\n",
|
|
||||||
"Args:\n",
|
|
||||||
" x: The firs\n",
|
|
||||||
"- function: def add(x, y):\n",
|
|
||||||
" Returns the sum of two numbers.\n",
|
|
||||||
"\n",
|
|
||||||
"This function takes two numerical inputs and returns their sum. \n",
|
|
||||||
"It supports both integers and floats.\n",
|
|
||||||
"\n",
|
|
||||||
"Args:\n",
|
|
||||||
" x: \n",
|
|
||||||
"- class: class Counter:\n",
|
|
||||||
" A simple counter class to track increments.\n",
|
|
||||||
"\n",
|
|
||||||
"This class provides a method to increment a total count. \n",
|
|
||||||
"The total count starts at zero and increases by\n",
|
|
||||||
"- function: def inc(self):\n",
|
|
||||||
" Increments the total attribute by one.\n",
|
|
||||||
"\n",
|
|
||||||
"This method updates the instance's total value, increasing it by one each time it is called.\n",
|
|
||||||
"\n",
|
|
||||||
"=== Updated Source ===\n",
|
|
||||||
"\"\"\"Adds two numbers together.\n",
|
|
||||||
"\n",
|
|
||||||
"\"\"\"Returns the sum of two numbers.\n",
|
|
||||||
"\n",
|
|
||||||
"This function takes two numerical inputs and returns their sum. \n",
|
|
||||||
"\"\"\"A simple counter class to track increments.\n",
|
|
||||||
"\"\"\"Increments the total attribute by one.\n",
|
|
||||||
"\n",
|
|
||||||
"This method updates the instance's total value, increasing it by one each time it is called.\"\"\"\n",
|
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"This class provides a method to increment a total count. \n",
|
|
||||||
"The total count starts at zero and increases by one with each call to the inc() method.\n",
|
|
||||||
"\n",
|
|
||||||
"Methods:\n",
|
|
||||||
" inc: Increments the total count by one.\"\"\"\n",
|
|
||||||
"\n",
|
|
||||||
"It supports both integers and floats.\n",
|
|
||||||
"\n",
|
|
||||||
"Args:\n",
|
|
||||||
" x: The first number to add.\n",
|
|
||||||
" y: The second number to add.\n",
|
|
||||||
"\n",
|
|
||||||
"Returns:\n",
|
|
||||||
" The sum of x and y.\"\"\"\n",
|
|
||||||
"\n",
|
|
||||||
"This function takes two numeric inputs and returns their sum.\n",
|
|
||||||
"It supports both integers and floats.\n",
|
|
||||||
"\n",
|
|
||||||
"Args:\n",
|
|
||||||
" x: The first number to add.\n",
|
|
||||||
" y: The second number to add.\n",
|
|
||||||
"Returns:\n",
|
|
||||||
" The sum of x and y.\"\"\"\n",
|
|
||||||
"\n",
|
|
||||||
"def add(x, y):\n",
|
|
||||||
" return x + y\n",
|
|
||||||
"\n",
|
|
||||||
"class Counter:\n",
|
|
||||||
" def inc(self):\n",
|
|
||||||
" self.total += 1\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"## Quick Test ##\n",
|
"## Quick Test ##\n",
|
||||||
"new_code, report = generate_docstrings_for_source(code, style=\"google\", module_name=\"demo\")\n",
|
"new_code, report = generate_docstrings_for_source(code, style=\"google\", module_name=\"demo\")\n",
|
||||||
@@ -616,39 +516,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 23,
|
"execution_count": null,
|
||||||
"id": "b0b0f852-982f-4918-9b5d-89880cc12003",
|
"id": "b0b0f852-982f-4918-9b5d-89880cc12003",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"* Running on local URL: http://127.0.0.1:7866\n",
|
|
||||||
"* To create a public link, set `share=True` in `launch()`.\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/html": [
|
|
||||||
"<div><iframe src=\"http://127.0.0.1:7866/\" 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"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# ================================================================\n",
|
"# ================================================================\n",
|
||||||
"# 🎨 Enhanced Gradio Interface with Model Selector\n",
|
"# 🎨 Enhanced Gradio Interface with Model Selector\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user