KishoreK commited on
Commit
e8f3051
·
verified ·
1 Parent(s): ec58e9f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("text-generation", model="google/gemma-2-2b-it")
5
+
6
+ def predict(query):
7
+ return pipe(query)
8
+
9
+ gradio_app = gr.Interface(
10
+ predict,
11
+ inputs="text", outputs="text",
12
+ title="Gemma 2B",
13
+ )
14
+
15
+ if __name__ == "__main__":
16
+ gradio_app.launch()