File size: 354 Bytes
8f66182
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr
import torch
from transformers import pipeline
ans = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
def answer(query):
  out=ans(query)
  return out
Demo = gr.Interface(fn=answer,inputs='text',outputs='text',examples=[['What is the capital of India ?']])
Demo.launch()