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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -1,17 +1,7 @@
1
- from transformers import pipeline
2
  import gradio as gr
3
 
4
- 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(
9
- text_inputs = input
10
- )
11
- return output[0]['generated_text'][len(input):]
12
-
13
- app = gr.Interface(
14
- fn = inference,
15
  inputs = [gr.Textbox(label = "Input")],
16
  outputs = [gr.Textbox(label = "Output")],
17
  title = "Demo",
 
 
1
  import gradio as gr
2
 
3
+ gr.load(
4
+ "meta-llama/Llama-3.2-1B-Instruct",
 
 
 
 
 
 
 
 
 
5
  inputs = [gr.Textbox(label = "Input")],
6
  outputs = [gr.Textbox(label = "Output")],
7
  title = "Demo",