{ "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 1\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----> 2\u001b[0m \u001b[39mimport\u001b[39;00m \u001b[39mfastbook\u001b[39;00m\n\u001b[1;32m 3\u001b[0m fastbook\u001b[39m.\u001b[39msetup_book()\n\u001b[1;32m 5\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 1\u001b[0m \u001b[39m# export\u001b[39;00m\n\u001b[1;32m 2\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----> 3\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 }