BillWork / app.py
PoseyATX's picture
Update app.py
230975a
raw
history blame
1.46 kB
import sys
import numpy as np
import gradio as gr
import requests
def greet(payload):
response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/Moist-Pony", headers={"Authorization": "Bearer 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"}, json=payload)
return response.json()
super().load(name=PoseyATX/Moist-Pony, src=huggingface, api_key=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, alias=BillWork, **kwargs)
output = greet({
"inputs": "The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.",
})
with gr.Blocks() as demo:
name = gr.Textbox(label="Paste Your Bill Text In Here:")
output = gr.Textbox(label="Analysis")
greet_btn = gr.Button("ANALYZE")
greet_btn.click(fn=greet, inputs=name, outputs=output)
demo.launch("share=True")