Juna190825 commited on
Commit
ea2f813
·
verified ·
1 Parent(s): 852831e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from huggingface_hub import InferenceClient
4
+
5
+ client = InferenceClient("google/gemma-2b-it")
6
+
7
+ def generate_text(prompt):
8
+ response = client.text_generation(prompt, max_new_tokens=50)
9
+ return response
10
+
11
+ demo = gr.Interface(fn=generate_text, inputs="text", outputs="text")
12
+ demo.launch()
13
+