Spaces:
Sleeping
Sleeping
File size: 5,142 Bytes
1335d7c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'fastbook'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/home/ghost/pythoncode/bear_classifier/app.ipynb Cell 1\u001b[0m line \u001b[0;36m2\n\u001b[1;32m <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W0sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m get_ipython()\u001b[39m.\u001b[39msystem(\u001b[39m'\u001b[39m\u001b[39m [ -e /content ] && pip install -Uqq fastbook\u001b[39m\u001b[39m'\u001b[39m)\n\u001b[0;32m----> <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W0sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mfastbook\u001b[39;00m\n\u001b[1;32m <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W0sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m fastbook\u001b[39m.\u001b[39msetup_book()\n\u001b[1;32m <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W0sZmlsZQ%3D%3D?line=4'>5</a>\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mfastbook\u001b[39;00m \u001b[39mimport\u001b[39;00m \u001b[39m*\u001b[39m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'fastbook'"
]
}
],
"source": [
"! [ -e /content ] && pip install -Uqq fastbook\n",
"import fastbook\n",
"fastbook.setup_book()\n",
"\n",
"from fastbook import *\n",
"from fastai.vision.widgets import *"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[KFatal error from pip prevented installation. Full pip output in file:\n",
" /home/ghost/.local/pipx/logs/cmd_2024-03-08_10.04.53_pip_errors.log\n",
"\n",
"Some possibly relevant errors from pip install:\n",
" \u001b[0m\u001b[31mERROR: Could not find a version that satisfies the requirement gradio (from versions: none)\u001b[0m\u001b[31m\n",
" \u001b[0m\u001b[31mERROR: No matching distribution found for gradio\u001b[0m\u001b[31m\n",
"\n",
"Error installing gradio.\n",
"\u001b[?25h\u001b[0m"
]
},
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'gradio'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m/home/ghost/pythoncode/bear_classifier/app.ipynb Cell 2\u001b[0m line \u001b[0;36m3\n\u001b[1;32m <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W1sZmlsZQ%3D%3D?line=0'>1</a>\u001b[0m \u001b[39m# export\u001b[39;00m\n\u001b[1;32m <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W1sZmlsZQ%3D%3D?line=1'>2</a>\u001b[0m get_ipython()\u001b[39m.\u001b[39msystem(\u001b[39m'\u001b[39m\u001b[39m pipx install gradio\u001b[39m\u001b[39m'\u001b[39m)\n\u001b[0;32m----> <a href='vscode-notebook-cell:/home/ghost/pythoncode/bear_classifier/app.ipynb#W1sZmlsZQ%3D%3D?line=2'>3</a>\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mgradio\u001b[39;00m \u001b[39mas\u001b[39;00m \u001b[39mgr\u001b[39;00m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'gradio'"
]
}
],
"source": [
"# export\n",
"! pipx install gradio\n",
"import gradio as gr"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"learn = load_learner('model.pkl')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
|