ccl-playground / app.py
darshil3011's picture
Update app.py
64374d2
raw
history blame
551 Bytes
import gradio as gr
from gradio_client import Client
# Function to call the Gradio API
def call_gradio_api(user_input):
client = Client("https://traversaal-internal-rag-faiss-gpt3-5.hf.space/")
result = client.predict(user_input, api_name="/predict")
return result
# Interface for the Gradio app
iface = gr.Interface(
fn=call_gradio_api,
inputs="text",
outputs="text",
layout="vertical",
title="CCL Playground",
description="Enter a query to get response using RAG"
)
# Launch the Gradio app
iface.launch()