PoseyATX commited on
Commit
230975a
1 Parent(s): e55b97a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -4
app.py CHANGED
@@ -1,5 +1,22 @@
1
- app.mount("/", StaticFiles(directory="static", html=True), name="static")
 
 
 
2
 
3
- @app.get("/")
4
- def index() -> FileResponse:
5
- return FileResponse(path="/app/static/index.html", media_type="text/html")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+ import numpy as np
3
+ import gradio as gr
4
+ import requests
5
 
6
+
7
+
8
+ def greet(payload):
9
+ response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/Moist-Pony", headers={"Authorization": "Bearer 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"}, json=payload)
10
+ return response.json()
11
+ super().load(name=PoseyATX/Moist-Pony, src=huggingface, api_key=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, alias=BillWork, **kwargs)
12
+ output = greet({
13
+ "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.",
14
+ })
15
+
16
+ with gr.Blocks() as demo:
17
+ name = gr.Textbox(label="Paste Your Bill Text In Here:")
18
+ output = gr.Textbox(label="Analysis")
19
+ greet_btn = gr.Button("ANALYZE")
20
+ greet_btn.click(fn=greet, inputs=name, outputs=output)
21
+
22
+ demo.launch("share=True")