DakMak commited on
Commit
eae940f
1 Parent(s): abf4914

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -1,16 +1,3 @@
1
- import requests
2
 
3
- API_URL = "https://api-inference.huggingface.co/models/microsoft/DialoGPT-medium"
4
- headers = {"Authorization": "Bearer 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"}
5
-
6
- def query(payload):
7
- response = requests.post(API_URL, headers=headers, json=payload)
8
- return response.json()
9
-
10
- output = query({
11
- "inputs": {
12
- "past_user_inputs": ["Which movie is the best ?"],
13
- "generated_responses": ["It's Die Hard for sure."],
14
- "text": "Can you explain why ?"
15
- },
16
- })
 
1
+ import gradio as gr
2
 
3
+ gr.Interface.load("models/microsoft/DialoGPT-medium").launch()