SethCram commited on
Commit
0209126
1 Parent(s): f6bdbed

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
+ import requests
3
+
4
+ API_URL = "https://api-inference.huggingface.co/models/tscholak/cxmefzzi"
5
+ headers = {"Authorization": f"Bearer {API_TOKEN}"}
6
+
7
+ def query(payload):
8
+ response = requests.post(API_URL, headers=headers, json=payload)
9
+ return response.json()
10
+
11
+ iface = gr.Interface(fn=query, inputs="text", outputs="text")
12
+ iface.launch()
13
+
14
+ #output = query({
15
+ # "inputs": "The answer to the universe is",
16
+ #})