podsum / app.py
iamAI123's picture
Update app.py
aa72f04
raw
history blame contribute delete
410 Bytes
import requests
import gradio as gr
API_URL = "https://api-inference.huggingface.co/models/project-baize/baize-v2-7b"
headers = {"Authorization": "Bearer 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"}
def query(txt):
payload = {'inputs' : txt}
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
gr.Interface(fn=query, inputs='text', outputs = 'text').launch()