sap_search / app.py
Preetham04's picture
Update app.py
a837e17 verified
raw
history blame
432 Bytes
import gradio as gr
from transformers import pipeline
pipeline = pipeline(task="text-generation", model="Preetham04/text-generation")
def predict(input_img):
predictions = pipeline(input_img)
return {p["label"]: p["score"] for p in predictions}
gradio_app = gr.Interface(
predict,
inputs="textbox",
outputs="text",
title="Text-generation",
)
if __name__ == "__main__":
gradio_app.launch(share=True)