File size: 432 Bytes
f561401 c29e86f cb17244 c29e86f f561401 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from gradio_client import Client
client = Client("https://08661de9477c2ac001.gradio.live")
# Definir la función de predicción
def predict(text):
result = client.predict(
text
)
return result
# Crear una interfaz Gradio
iface = gr.Interface(
fn=predict,
inputs=gr.Textbox(),
outputs=gr.Textbox(),
live=False,
title="Ollama"
)
# Iniciar la interfaz Gradio
iface.launch() |