Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import pipeline
|
3 |
|
4 |
-
|
|
|
|
|
5 |
gr.Interface.from_pipeline(pipe,
|
6 |
title="TextGen",
|
7 |
description="Using pipeline with Phi3",
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline, AutoTokenizer
|
3 |
|
4 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
|
5 |
+
|
6 |
+
pipe = pipeline("text-generation", model="microsoft/Phi-3-mini-128k-instruct", trust_remote_code=True, tokenizer=tokenizer)
|
7 |
gr.Interface.from_pipeline(pipe,
|
8 |
title="TextGen",
|
9 |
description="Using pipeline with Phi3",
|