podsum / app.py
iamAI123's picture
Update app.py
381d8fe
raw
history blame
372 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(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
gr.Interface(fn=query, inputs='text', outputs = 'text').launch()