richardkimsm89 commited on
Commit
427c52f
·
verified ·
1 Parent(s): c3d5504

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,8 +5,10 @@ pipe1 = pipeline(model = "meta-llama/Llama-3.2-1B-Instruct")
5
  #pipe2 = pipeline(model = "meta-llama/Llama-3.2-3B-Instruct")
6
 
7
  def inference(input):
8
- output = pipe1(input)
9
- return output[0]['generated_text']
 
 
10
 
11
  app = gr.Interface(
12
  fn = inference,
@@ -16,6 +18,4 @@ app = gr.Interface(
16
  examples = [
17
  ["Hello, Llama."]
18
  ]
19
- )
20
-
21
- app.launch()
 
5
  #pipe2 = pipeline(model = "meta-llama/Llama-3.2-3B-Instruct")
6
 
7
  def inference(input):
8
+ output = pipe1(
9
+ text_inputs = input
10
+ )
11
+ return output[0]['generated_text'][len(input):]
12
 
13
  app = gr.Interface(
14
  fn = inference,
 
18
  examples = [
19
  ["Hello, Llama."]
20
  ]
21
+ ).launch()