richardkimsm89 commited on
Commit
75168c6
·
verified ·
1 Parent(s): f552d68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -1,18 +1,8 @@
1
- from transformers import pipeline
2
  import gradio as gr
3
 
4
- pipe1 = pipeline(model = "google/gemma-2b-it")
5
- #pipe2 = pipeline(model = "google/gemma-2-9b-it")
6
- #pipe3 = pipeline(model = "google/gemma-2-27b-it")
7
-
8
- def inference(input):
9
- output = pipe1(
10
- input
11
- )
12
- return output[0]['generated_text'][len(input):]
13
-
14
- app = gr.Interface(
15
- fn = inference,
16
  inputs = [gr.Textbox(label = "Input")],
17
  outputs = [gr.Textbox(label = "Output")],
18
  title = "Demo",
 
 
1
  import gradio as gr
2
 
3
+ app = gr.load(
4
+ google/gemma-2-2b-it,
5
+ src = "models",
 
 
 
 
 
 
 
 
 
6
  inputs = [gr.Textbox(label = "Input")],
7
  outputs = [gr.Textbox(label = "Output")],
8
  title = "Demo",