Spaces:
Sleeping
Sleeping
File size: 648 Bytes
c8c2702 5dacd39 c8c2702 5dacd39 c8c2702 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
# def greet(name):
# return "Hello " + name + "!!"
# import requests
# API_URL = "https://api-inference.huggingface.co/models/AK-12/llama-2-medical-fine-tune"
# headers = {"Authorization": "Bearer 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"}
def query(payload):
response = requests.post("https://api-inference.huggingface.co/models/AK-12/llama-2-medical-fine-tune", headers={"Authorization": "Bearer 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"}, json=payload)
return response.json()
# output = query({
# "inputs": "What is haller cells? ",
# })
iface = gr.Interface(fn=query, inputs="text", outputs="text")
iface.launch() |