wizardlm_api / app.py
DR-Rakshitha's picture
Update app.py
5e527b8
raw
history blame
541 Bytes
import gradio as gr
from gpt4all import GPT4All
# Specify the local path to the downloaded model file
model_path = "wizardlm-13b-v1.1-superhot-8k.ggmlv3.q4_0.bin"
# Initialize the GPT4All model
model = GPT4All(model_path)
def generate_text(input_text):
output = model.generate(input_text)
return output
text_generation_interface = gr.Interface(
fn=generate_text,
inputs=[
gr.inputs.Textbox(label="Input Text"),
],
outputs=gr.inputs.Textbox(label="Generated Text"),
title="Wizardlm_13b_v1",
).launch()