Spaces:
Sleeping
Sleeping
import gradio as gr | |
import requests | |
API_URL = "https://api-inference.huggingface.co/models/Duxiaoman-DI/XuanYuan-70B" | |
headers = {"Authorization": "Bearer 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"} | |
def query(payload): | |
response = requests.post(API_URL, headers=headers, json=payload) | |
return response.json() | |
def greet(name): | |
output = query({ | |
"inputs": "Can you please let us know more details about your ", | |
}) | |
return output | |
iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
iface.launch() |