Picard / app.py
SethCram's picture
Create app.py
0209126
raw
history blame
420 Bytes
import gradio as gr
import requests
API_URL = "https://api-inference.huggingface.co/models/tscholak/cxmefzzi"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
iface = gr.Interface(fn=query, inputs="text", outputs="text")
iface.launch()
#output = query({
# "inputs": "The answer to the universe is",
#})