AK-12's picture
create main.py
c8c2702
raw
history blame
516 Bytes
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(API_URL, headers=headers, json=payload)
return response.json()
# output = query({
# "inputs": "What is haller cells? ",
# })
iface = gr.Interface(fn=query, inputs="text", outputs="text")
iface.launch()