pivovalera2012 commited on
Commit
7d37f96
1 Parent(s): b652094

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -12
app.py CHANGED
@@ -1,12 +1,16 @@
1
- import requests
2
-
3
- API_URL = "https://api-inference.huggingface.co/models/google/gemma-7b"
4
- headers = {"Authorization": "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
5
-
6
- def query(payload):
7
- response = requests.post(API_URL, headers=headers, json=payload)
8
- return response.json()
9
-
10
- output = query({
11
- "inputs": "Can you please let us know more details about your ",
12
- })
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+
4
+
5
+ def generate_text(prompt):
6
+ return 'Привет'
7
+
8
+
9
+ demo = gr.Interface(
10
+ generate_text,
11
+ inputs=["textbox"],
12
+ outputs=["textbox"],
13
+ ]
14
+ )
15
+
16
+ demo.launch()