Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,7 @@
|
|
1 |
-
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
|
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",
|