abidlabs HF Staff commited on
Commit
a95e4f3
·
1 Parent(s): c8ce59e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ instruct_pipeline = pipeline(model="databricks/dolly-v2-12b", trust_remote_code=True, device_map="auto")
5
+
6
+ def infer(x):
7
+ return instruct_pipeline(x)
8
+
9
+ gr.Interface(infer, "textbox", "textbox").launch()