Anish Asokan
fix
8f7eb5d
raw
history blame
No virus
1.11 kB
import gradio as gr
#from transformers import pipeline
# previous code #1
"""
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()
"""
# active code
"""
# reference: https://medium.com/@rowel/gradio-hugging-face-for-rapid-deep-learning-app-development-709a78e7ccc0
# https://huggingface.co/spaces/rowel/22k-image-classification
pipe = pipeline(task="conversational",
# model for 22k-category classification
model="abhinand/malayalam-llama-7b-instruct-v0.1")
gr.Interface.from_pipeline(pipe,
title="Chat",
description="Ask your questions in malayalam",
examples = ['കേരളത്തിലെ ജില്ലകൾ ഏതെല്ലാം ?',
'കേരളത്തിന്റെ തലസ്ഥാനം എവിടെയാണ് ?',],
).launch(inbrowser=True)
"""
gr.load("abhinand/malayalam-llama-7b-instruct-v0.1").launch()