File size: 765 Bytes
e31ba85
 
7dde59b
e31ba85
 
 
 
 
 
 
 
8517b94
e31ba85
 
7dde59b
b841138
7c81ed9
e31ba85
8517b94
7c81ed9
2be97d5
8517b94
e31ba85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# import gradio as gr
# print("hello")
# gr.load("NousResearch/Yarn-Mistral-7b-128k",src="models").launch()
# from transformers import pipeline

# classifier = pipeline("sentiment-analysis")
# def get_class(input):
#     return classifier("I've been waiting for a HuggingFace course my whole life.")

# iface = gr.Interface(fn=get_class, inputs="text", outputs=['text'], title='hello', description='play around')
# iface.launch()
fsddsf

# Use a pipeline as a high-level helper
from transformers import pipeline

my_pipe = pipeline("text-generation", model="NousResearch/Yarn-Mistral-7b-128k")

def get_class_1(input):
    return my_pipe(input)

iface = gr.Interface(fn=get_class_1, inputs="text", outputs=['text'], title='hello', description='LLM')
iface.launch()