JHONGONZALEZ commited on
Commit
7f39d0d
1 Parent(s): d3e0062

Initial commit

Browse files
Files changed (2) hide show
  1. app.py +23 -0
  2. requirements.txt +3 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ import numpy as np
4
+ import matplotlib.pyplot as plt
5
+
6
+ def calcular_movimiento(tipo_movimiento, velocidad, velocidad_inicial, aceleracion):
7
+ # L贸gica de c谩lculo y generaci贸n de gr谩ficas
8
+ # (Aqu铆 puedes incluir el c贸digo que ya tienes para calcular y graficar)
9
+
10
+ return plt.figure() # Devuelve la figura generada
11
+
12
+ # Configuraci贸n de la interfaz Gradio
13
+ inputs = [
14
+ gr.Dropdown(choices=['mru', 'mruv'], label='Tipo de Movimiento:'),
15
+ gr.Number(label='Velocidad (m/s):', value=0),
16
+ gr.Number(label='Velocidad Inicial (m/s):', value=0),
17
+ gr.Number(label='Aceleraci贸n (m/s虏):', value=0),
18
+ ]
19
+
20
+ outputs = gr.outputs.Image(type="pil")
21
+
22
+ gr.Interface(fn=calcular_movimiento, inputs=inputs, outputs=outputs).launch()
23
+
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ numpy
2
+ matplotlib
3
+ gradio