modelacpc / app.py
KrishP-12's picture
Update app.py
8ac7675 verified
raw
history blame
559 Bytes
import gradio as gr
from model2 import ChatbotModel
# Load the model
//model = torch.load("model.pt") # Adjust as needed
# Define the chatbot function
def chatbot(input_text):
# Use your model inference function here
response = ChatbotModel.get_response(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()