Spaces:
Sleeping
Sleeping
File size: 529 Bytes
9d40b8b 7f77487 9d40b8b 6ec906d 9d40b8b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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() |