Spaces:
Sleeping
Sleeping
File size: 471 Bytes
3e99450 403dca1 3e99450 |
1 2 3 4 5 6 7 8 9 |
import requests
import gradio as gr
API_URL = "https://api-inference.huggingface.co/models/philschmid/bart-large-cnn-samsum"
headers = {"Authorization": "Bearer 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","Content-Type": "application/json" }
def query(input_your_article):
response = requests.post(API_URL, headers=headers, json=input_your_article)
output=response.json()
return output[0]['summary_text']
gr.Interface(query, inputs="text", outputs="text").launch() |