Refreshed notebooks, particularly with new Week 1

This commit is contained in:
Edward Donner
2024-11-13 15:46:22 +00:00
parent 6ba1875cd3
commit 21c7a8155c
34 changed files with 2331 additions and 410 deletions

View File

@@ -529,77 +529,6 @@
"source": [
"Tester.test(gpt_fine_tuned, test)"
]
},
{
"cell_type": "code",
"execution_count": 320,
"id": "03ff4b48-3788-4370-9e34-6592f23d1bce",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DNS resolution for api.gradio.app: 54.68.118.249\n",
"Gradio API Status: 500\n",
"Gradio API Response: Internal Server Error\n",
"HuggingFace CDN Status: 403\n"
]
}
],
"source": [
"import requests\n",
"import socket\n",
"\n",
"def check_connectivity():\n",
" try:\n",
" # Check DNS resolution\n",
" ip = socket.gethostbyname('api.gradio.app')\n",
" print(f\"DNS resolution for api.gradio.app: {ip}\")\n",
"\n",
" # Check connection to Gradio API\n",
" response = requests.get(\"https://api.gradio.app/v2/tunnel/\", timeout=5)\n",
" print(f\"Gradio API Status: {response.status_code}\")\n",
" print(f\"Gradio API Response: {response.text}\")\n",
"\n",
" # Check connection to HuggingFace CDN\n",
" cdn_response = requests.get(\"https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_aarch64\", timeout=5)\n",
" print(f\"HuggingFace CDN Status: {cdn_response.status_code}\")\n",
" except Exception as e:\n",
" print(f\"Error in connectivity check: {e}\")\n",
"\n",
"check_connectivity()"
]
},
{
"cell_type": "code",
"execution_count": 323,
"id": "f7d4eec4-da5e-4fbf-ba3e-fbbcfb399d6c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'4.44.0'"
]
},
"execution_count": 323,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import gradio\n",
"gradio.__version__"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cad08a54-912b-43d2-9280-f00b5a7775a6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {