Spaces:
Sleeping
Sleeping
JHON FREDY GONZ脕LEZ
commited on
Upload MOVIMIENTO_PARABOLICO.ipynb
Browse files- MOVIMIENTO_PARABOLICO.ipynb +277 -0
MOVIMIENTO_PARABOLICO.ipynb
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"source": [
|
6 |
+
"!pip install gradio matplotlib pillow # Instalar las bibliotecas necesarias\n",
|
7 |
+
"!pip install huggingface_hub\n",
|
8 |
+
"import numpy as np\n",
|
9 |
+
"import gradio as gr\n",
|
10 |
+
"import matplotlib.pyplot as plt\n",
|
11 |
+
"from PIL import Image\n",
|
12 |
+
"\n",
|
13 |
+
"# Cargar la imagen del logo (aseg煤rate de que el archivo est茅 en la ruta correcta)\n",
|
14 |
+
"logo_image = \"/content/LOGOCIPDOQUEBRADAS.png\"\n",
|
15 |
+
"\n",
|
16 |
+
"def calcular_movimiento_parabolico(v0, angulo, h_inicial):\n",
|
17 |
+
" g = 9.81 # Aceleraci贸n debido a la gravedad (m/s^2)\n",
|
18 |
+
" angulo_rad = np.radians(angulo)\n",
|
19 |
+
"\n",
|
20 |
+
" # Tiempo de vuelo considerando altura inicial\n",
|
21 |
+
" t_vuelo = (v0 * np.sin(angulo_rad) + np.sqrt((v0 * np.sin(angulo_rad))**2 + 2 * g * h_inicial)) / g\n",
|
22 |
+
"\n",
|
23 |
+
" # Tiempo en intervalos\n",
|
24 |
+
" t = np.linspace(0, t_vuelo, num=500)\n",
|
25 |
+
"\n",
|
26 |
+
" # Trayectoria\n",
|
27 |
+
" x = v0 * np.cos(angulo_rad) * t\n",
|
28 |
+
" y = h_inicial + v0 * np.sin(angulo_rad) * t - 0.5 * g * t**2\n",
|
29 |
+
"\n",
|
30 |
+
" # Altura m谩xima\n",
|
31 |
+
" h_max = h_inicial + (v0**2 * np.sin(angulo_rad)**2) / (2 * g)\n",
|
32 |
+
"\n",
|
33 |
+
" # Alcance m谩ximo\n",
|
34 |
+
" alcance_max = v0 * np.cos(angulo_rad) * t_vuelo\n",
|
35 |
+
"\n",
|
36 |
+
" return x, y, h_max, alcance_max, t_vuelo\n",
|
37 |
+
"\n",
|
38 |
+
"def graficar(v0, angulo, h_inicial):\n",
|
39 |
+
" x, y, h_max, alcance_max, t_vuelo = calcular_movimiento_parabolico(v0, angulo, h_inicial)\n",
|
40 |
+
"\n",
|
41 |
+
" plt.figure(figsize=(10, 5))\n",
|
42 |
+
" plt.plot(x, y, label='Trayectoria', color='purple')\n",
|
43 |
+
" plt.title('Movimiento Parab贸lico')\n",
|
44 |
+
" plt.xlabel('Distancia (m)')\n",
|
45 |
+
" plt.ylabel('Altura (m)')\n",
|
46 |
+
" plt.grid(True)\n",
|
47 |
+
"\n",
|
48 |
+
" # C谩lculo de componentes de velocidad\n",
|
49 |
+
" vx = v0 * np.cos(np.radians(angulo))\n",
|
50 |
+
" vy = v0 * np.sin(np.radians(angulo))\n",
|
51 |
+
"\n",
|
52 |
+
" # A帽adir vectores\n",
|
53 |
+
" plt.quiver(0, h_inicial, vx, vy, angles='xy', scale_units='xy', scale=1, color='r', label='Vector de Lanzamiento (V0)')\n",
|
54 |
+
" plt.quiver(0, h_inicial, vx, 0, angles='xy', scale_units='xy', scale=1, color='g', label='Componente x (Vx)')\n",
|
55 |
+
" plt.quiver(0, h_inicial, 0, vy, angles='xy', scale_units='xy', scale=1, color='b', label='Componente y (Vy)')\n",
|
56 |
+
"\n",
|
57 |
+
" plt.axhline(0, color='k', linewidth=0.5, linestyle='--')\n",
|
58 |
+
" plt.axvline(0, color='k', linewidth=0.5, linestyle='--')\n",
|
59 |
+
"\n",
|
60 |
+
" plt.xlim(0, alcance_max * 1.1)\n",
|
61 |
+
" plt.ylim(0, h_max * 1.1)\n",
|
62 |
+
"\n",
|
63 |
+
" # Dibujar el arco del 谩ngulo\n",
|
64 |
+
" angulo_rad = np.arctan2(vy, vx)\n",
|
65 |
+
" arco_x = np.linspace(0, vx, 100)\n",
|
66 |
+
" arco_y = h_inicial + (arco_x * np.tan(angulo_rad))\n",
|
67 |
+
" plt.plot(arco_x, arco_y, color='orange', label='脕ngulo de Lanzamiento')\n",
|
68 |
+
" plt.text(vx / 2, h_inicial + 2, f'脕ngulo: {angulo}掳', fontsize=12, color='orange', ha='center')\n",
|
69 |
+
"\n",
|
70 |
+
" plt.legend()\n",
|
71 |
+
" plt.savefig('plot.png') # Guardar la gr谩fica\n",
|
72 |
+
" plt.close()\n",
|
73 |
+
"\n",
|
74 |
+
" # Formatear la salida del texto con las ecuaciones en formato LaTeX\n",
|
75 |
+
" resultado = (\n",
|
76 |
+
" \"**Ecuaciones del Movimiento Parab贸lico:** \\n\"\n",
|
77 |
+
" \"$$ h_{max} = h_0 + \\\\frac{v_0^2 \\\\sin^2(\\\\theta)}{2g} $$ \\n\"\n",
|
78 |
+
" \"$$ R = \\\\frac{v_0 \\\\cos(\\\\theta)}{g} \\\\left( v_0 \\\\sin(\\\\theta) + \\\\sqrt{(v_0 \\\\sin(\\\\theta))^2 + 2gh_0} \\\\right) $$ \\n\"\n",
|
79 |
+
" \"$$ t_{vuelo} = \\\\frac{v_0 \\\\sin(\\\\theta) + \\\\sqrt{(v_0 \\\\sin(\\\\theta))^2 + 2gh_0}}{g} $$ \\n\"\n",
|
80 |
+
" \"Ecuaciones de posici贸n: \\n\"\n",
|
81 |
+
" \"$$ x(t) = v_0 \\\\cos(\\\\theta) \\\\cdot t $$ \\n\"\n",
|
82 |
+
" \"$$ y(t) = h_0 + v_0 \\\\sin(\\\\theta) \\\\cdot t - \\\\frac{1}{2} g \\\\cdot t^2 $$ \\n\\n\"\n",
|
83 |
+
" \"**Valores calculados:** \\n\"\n",
|
84 |
+
" f\"- Altura m谩xima (h_max): {h_max:.2f} m \\n\"\n",
|
85 |
+
" f\"- Alcance m谩ximo (R): {alcance_max:.2f} m \\n\"\n",
|
86 |
+
" f\"- Tiempo de vuelo (t_vuelo): {t_vuelo:.2f} s\"\n",
|
87 |
+
" )\n",
|
88 |
+
"\n",
|
89 |
+
" return Image.open('plot.png'), resultado, 'plot.png' # Devolver la ruta del archivo\n",
|
90 |
+
"\n",
|
91 |
+
"# Crear la interfaz de Gradio\n",
|
92 |
+
"with gr.Blocks() as interfaz:\n",
|
93 |
+
" # Mostrar el logo en la parte superior con tama帽o ajustado\n",
|
94 |
+
" with gr.Row():\n",
|
95 |
+
" gr.Image(logo_image, show_label=False, interactive=False, width=300, height=150) # Ajusta los valores seg煤n sea necesario\n",
|
96 |
+
"\n",
|
97 |
+
" # T铆tulo de la interfaz\n",
|
98 |
+
" gr.Markdown(\"## **Simulaci贸n de Movimiento Parab贸lico - UNAD CIP Dosquebradas ECBTI**\")\n",
|
99 |
+
" gr.Markdown(\"**Ingrese los valores para la simulaci贸n**\")\n",
|
100 |
+
"\n",
|
101 |
+
" # Entradas para velocidad, 谩ngulo y altura inicial usando sliders\n",
|
102 |
+
" with gr.Row():\n",
|
103 |
+
" v0_input = gr.Slider(label=\"Velocidad Inicial (m/s)\", minimum=0, maximum=100, value=20, step=1)\n",
|
104 |
+
" angulo_input = gr.Slider(label=\"脕ngulo de Lanzamiento (grados)\", minimum=0, maximum=90, value=45, step=1)\n",
|
105 |
+
" h_inicial_input = gr.Number(label=\"Altura Inicial (m)\", value=0)\n",
|
106 |
+
"\n",
|
107 |
+
" # Salidas para la gr谩fica y resultados\n",
|
108 |
+
" output_image = gr.Image(type=\"pil\")\n",
|
109 |
+
" output_markdown = gr.Markdown(label=\"Ecuaciones y Valores Calculados\")\n",
|
110 |
+
"\n",
|
111 |
+
" # Bot贸n para generar gr谩fica\n",
|
112 |
+
" boton_graficar = gr.Button(\"Generar Gr谩fica\")\n",
|
113 |
+
" boton_descargar = gr.File(label=\"Descargar Gr谩fica\", type=\"filepath\") # Cambiado a filepath\n",
|
114 |
+
"\n",
|
115 |
+
" # Funcionalidad del bot贸n\n",
|
116 |
+
" boton_graficar.click(fn=graficar, inputs=[v0_input, angulo_input, h_inicial_input], outputs=[output_image, output_markdown, boton_descargar])\n",
|
117 |
+
"\n",
|
118 |
+
"# Lanzar la interfaz\n",
|
119 |
+
"interfaz.launch()\n"
|
120 |
+
],
|
121 |
+
"metadata": {
|
122 |
+
"colab": {
|
123 |
+
"base_uri": "https://localhost:8080/",
|
124 |
+
"height": 1000
|
125 |
+
},
|
126 |
+
"id": "z53q7pS2N558",
|
127 |
+
"outputId": "cda7be0c-63ed-4bc2-e868-125d521fece5"
|
128 |
+
},
|
129 |
+
"execution_count": 66,
|
130 |
+
"outputs": [
|
131 |
+
{
|
132 |
+
"output_type": "stream",
|
133 |
+
"name": "stdout",
|
134 |
+
"text": [
|
135 |
+
"Requirement already satisfied: gradio in /usr/local/lib/python3.10/dist-packages (4.44.0)\n",
|
136 |
+
"Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (3.7.1)\n",
|
137 |
+
"Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (10.4.0)\n",
|
138 |
+
"Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (23.2.1)\n",
|
139 |
+
"Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
|
140 |
+
"Requirement already satisfied: fastapi<1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.115.0)\n",
|
141 |
+
"Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio) (0.4.0)\n",
|
142 |
+
"Requirement already satisfied: gradio-client==1.3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.3.0)\n",
|
143 |
+
"Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.27.2)\n",
|
144 |
+
"Requirement already satisfied: huggingface-hub>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.24.7)\n",
|
145 |
+
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.4.5)\n",
|
146 |
+
"Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.4)\n",
|
147 |
+
"Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.5)\n",
|
148 |
+
"Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.26.4)\n",
|
149 |
+
"Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.10.7)\n",
|
150 |
+
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (24.1)\n",
|
151 |
+
"Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.4)\n",
|
152 |
+
"Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.9.2)\n",
|
153 |
+
"Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio) (0.25.1)\n",
|
154 |
+
"Requirement already satisfied: python-multipart>=0.0.9 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.0.12)\n",
|
155 |
+
"Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.2)\n",
|
156 |
+
"Requirement already satisfied: ruff>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.6.8)\n",
|
157 |
+
"Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.10.0)\n",
|
158 |
+
"Requirement already satisfied: tomlkit==0.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.0)\n",
|
159 |
+
"Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.5)\n",
|
160 |
+
"Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.12.2)\n",
|
161 |
+
"Requirement already satisfied: urllib3~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.3)\n",
|
162 |
+
"Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.31.0)\n",
|
163 |
+
"Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.3.0->gradio) (2024.6.1)\n",
|
164 |
+
"Requirement already satisfied: websockets<13.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.3.0->gradio) (12.0)\n",
|
165 |
+
"Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.3.0)\n",
|
166 |
+
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (0.12.1)\n",
|
167 |
+
"Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (4.53.1)\n",
|
168 |
+
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (1.4.7)\n",
|
169 |
+
"Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (3.1.4)\n",
|
170 |
+
"Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib) (2.8.2)\n",
|
171 |
+
"Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n",
|
172 |
+
"Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
|
173 |
+
"Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.2.2)\n",
|
174 |
+
"Requirement already satisfied: starlette<0.39.0,>=0.37.2 in /usr/local/lib/python3.10/dist-packages (from fastapi<1.0->gradio) (0.38.6)\n",
|
175 |
+
"Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (2024.8.30)\n",
|
176 |
+
"Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (1.0.5)\n",
|
177 |
+
"Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
|
178 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (3.16.1)\n",
|
179 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (2.32.3)\n",
|
180 |
+
"Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (4.66.5)\n",
|
181 |
+
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
|
182 |
+
"Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
|
183 |
+
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
|
184 |
+
"Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (2.23.4)\n",
|
185 |
+
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)\n",
|
186 |
+
"Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
|
187 |
+
"Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
|
188 |
+
"Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (13.8.1)\n",
|
189 |
+
"Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
|
190 |
+
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n",
|
191 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.3.2)\n",
|
192 |
+
"Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
|
193 |
+
"Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.24.7)\n",
|
194 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.16.1)\n",
|
195 |
+
"Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2024.6.1)\n",
|
196 |
+
"Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (24.1)\n",
|
197 |
+
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.2)\n",
|
198 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.32.3)\n",
|
199 |
+
"Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.66.5)\n",
|
200 |
+
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.12.2)\n",
|
201 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.3.2)\n",
|
202 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.10)\n",
|
203 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.2.3)\n",
|
204 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2024.8.30)\n",
|
205 |
+
"Setting queue=True in a Colab notebook requires sharing enabled. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
|
206 |
+
"\n",
|
207 |
+
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
|
208 |
+
"Running on public URL: https://44eff4d5d346d05117.gradio.live\n",
|
209 |
+
"\n",
|
210 |
+
"This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"
|
211 |
+
]
|
212 |
+
},
|
213 |
+
{
|
214 |
+
"output_type": "display_data",
|
215 |
+
"data": {
|
216 |
+
"text/plain": [
|
217 |
+
"<IPython.core.display.HTML object>"
|
218 |
+
],
|
219 |
+
"text/html": [
|
220 |
+
"<div><iframe src=\"https://44eff4d5d346d05117.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
221 |
+
]
|
222 |
+
},
|
223 |
+
"metadata": {}
|
224 |
+
},
|
225 |
+
{
|
226 |
+
"output_type": "execute_result",
|
227 |
+
"data": {
|
228 |
+
"text/plain": []
|
229 |
+
},
|
230 |
+
"metadata": {},
|
231 |
+
"execution_count": 66
|
232 |
+
}
|
233 |
+
]
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"cell_type": "code",
|
237 |
+
"source": [
|
238 |
+
"!apt-get install git\n"
|
239 |
+
],
|
240 |
+
"metadata": {
|
241 |
+
"colab": {
|
242 |
+
"base_uri": "https://localhost:8080/"
|
243 |
+
},
|
244 |
+
"id": "BvwfK0jOaOw0",
|
245 |
+
"outputId": "b02b0766-6403-4d14-82c2-5118333bd851"
|
246 |
+
},
|
247 |
+
"execution_count": 72,
|
248 |
+
"outputs": [
|
249 |
+
{
|
250 |
+
"output_type": "stream",
|
251 |
+
"name": "stdout",
|
252 |
+
"text": [
|
253 |
+
"Reading package lists... Done\n",
|
254 |
+
"Building dependency tree... Done\n",
|
255 |
+
"Reading state information... Done\n",
|
256 |
+
"git is already the newest version (1:2.34.1-1ubuntu1.11).\n",
|
257 |
+
"0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.\n"
|
258 |
+
]
|
259 |
+
}
|
260 |
+
]
|
261 |
+
}
|
262 |
+
],
|
263 |
+
"metadata": {
|
264 |
+
"colab": {
|
265 |
+
"provenance": []
|
266 |
+
},
|
267 |
+
"kernelspec": {
|
268 |
+
"display_name": "Python 3",
|
269 |
+
"name": "python3"
|
270 |
+
},
|
271 |
+
"language_info": {
|
272 |
+
"name": "python"
|
273 |
+
}
|
274 |
+
},
|
275 |
+
"nbformat": 4,
|
276 |
+
"nbformat_minor": 0
|
277 |
+
}
|