modelacpc / app.py
KrishP-12's picture
Update app.py
f71584f verified
raw
history blame
535 Bytes
import gradio as gr
import torch
# Load the model
model = torch.load("chatbot_model.pt") # Adjust as needed
# Define the chatbot function
def chatbot(input_text):
# Use your model inference function here
response = model.qa_chain(input_text) # Call to your response function
return response
# Define the Gradio interface
iface = gr.Interface(
fn=chatbot, # The function that will be called
inputs="text", # User will input text
outputs="text" # Model will output text
)
# Launch the app
iface.launch()