dpassov commited on
Commit
7c81ed9
β€’
1 Parent(s): e2a78f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,10 +14,10 @@
14
  # Use a pipeline as a high-level helper
15
  from transformers import pipeline
16
 
17
- pipe = pipeline("text-generation", model="NousResearch/Yarn-Mistral-7b-128k")
18
 
19
  def get_class(input):
20
- return pipe(input)
21
 
22
  iface = gr.Interface(fn=get_class, inputs="text", outputs=['text'], title='hello', description='LLM')
23
  iface.launch()
 
14
  # Use a pipeline as a high-level helper
15
  from transformers import pipeline
16
 
17
+ my_pipe = pipeline("text-generation", model="NousResearch/Yarn-Mistral-7b-128k")
18
 
19
  def get_class(input):
20
+ return my_pipe(input)
21
 
22
  iface = gr.Interface(fn=get_class, inputs="text", outputs=['text'], title='hello', description='LLM')
23
  iface.launch()