Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
import sys
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
|
| 5 |
-
def query(
|
| 6 |
response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/GPTxLege_FoxHunter", headers={"Authorization": "Bearer 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"}, json=payload)
|
| 7 |
return response.json()
|
| 8 |
super().load(name=PoseyATX/FoxHunter, src=huggingface, api_key=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, alias=FoxHunter, **kwargs)
|
|
@@ -10,5 +11,10 @@ output = query({
|
|
| 10 |
"inputs": "https://capitol.texas.gov/tlodocs/88R/billtext/html/HB00025I.htm",
|
| 11 |
})
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import sys
|
| 2 |
+
import numpy as np
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
|
| 6 |
+
def query(payload):
|
| 7 |
response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/GPTxLege_FoxHunter", headers={"Authorization": "Bearer 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"}, json=payload)
|
| 8 |
return response.json()
|
| 9 |
super().load(name=PoseyATX/FoxHunter, src=huggingface, api_key=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, alias=FoxHunter, **kwargs)
|
|
|
|
| 11 |
"inputs": "https://capitol.texas.gov/tlodocs/88R/billtext/html/HB00025I.htm",
|
| 12 |
})
|
| 13 |
|
| 14 |
+
with gr.Blocks() as demo:
|
| 15 |
+
name = gr.Textbox(label="Name")
|
| 16 |
+
output = gr.Textbox(label="Output Box")
|
| 17 |
+
greet_btn = gr.Button("Greet")
|
| 18 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output)
|
| 19 |
+
|
| 20 |
+
demo.launch("share=True")
|