Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import numpy as np
|
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
|
| 6 |
-
def
|
| 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)
|
|
@@ -12,8 +12,8 @@ output = query({
|
|
| 12 |
})
|
| 13 |
|
| 14 |
with gr.Blocks() as demo:
|
| 15 |
-
name = gr.Textbox(label="
|
| 16 |
-
output = gr.Textbox(label="
|
| 17 |
greet_btn = gr.Button("Greet")
|
| 18 |
greet_btn.click(fn=greet, inputs=name, outputs=output)
|
| 19 |
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
|
| 6 |
+
def greet(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)
|
|
|
|
| 12 |
})
|
| 13 |
|
| 14 |
with gr.Blocks() as demo:
|
| 15 |
+
name = gr.Textbox(label="Link:")
|
| 16 |
+
output = gr.Textbox(label="Summary")
|
| 17 |
greet_btn = gr.Button("Greet")
|
| 18 |
greet_btn.click(fn=greet, inputs=name, outputs=output)
|
| 19 |
|