Spaces:
Runtime error
Runtime error
import gradio as gr | |
import requests | |
import os | |
API_URL = "https://api-inference.huggingface.co/models/voxta/ehartford_dolphin-2_2-yi-34b-3bpw-exl2" | |
def query(payload): | |
response = requests.post(API_URL, headers=headers, json=payload) | |
return response.json() | |
def query_wrapper(text): | |
payload = {"inputs": text} | |
output = query(payload) | |
return output | |
iface = gr.Interface( | |
fn=query_wrapper, | |
inputs="text", | |
outputs="json" | |
) | |
iface.launch() |