AhmadT198 commited on
Commit
b7899e7
·
1 Parent(s): beca46c

Return pipe inside funciton

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -7,12 +7,14 @@ import torch
7
  # Use a pipeline as a high-level helper
8
  from transformers import pipeline
9
 
10
- print("RUNNING PIPE")
11
- pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B", max_new_tokens=200, device=0)
12
- print("PIPE DONE")
13
 
14
  @spaces.GPU(duration=120)
15
  def llama3_1_8B(question):
 
 
 
 
16
  messages = [
17
  {"role": "user", "content": question},
18
  ]
 
7
  # Use a pipeline as a high-level helper
8
  from transformers import pipeline
9
 
10
+
 
 
11
 
12
  @spaces.GPU(duration=120)
13
  def llama3_1_8B(question):
14
+ print("RUNNING PIPE")
15
+ pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B", max_new_tokens=200, device=0)
16
+ print("PIPE DONE")
17
+
18
  messages = [
19
  {"role": "user", "content": question},
20
  ]