Spaces:
Build error
Build error
| from gradio import Interface, inputs | |
| import requests | |
| import json | |
| interface = Interface() | |
| def rephrase(text): | |
| response = requests.post( | |
| "https://api.respell.ai/v1/run", | |
| headers={"Authorization": "Bearer 6438355a-133a-4ad6-9674-a4f9be050cf8", | |
| "Accept": "application/json", | |
| "Content-Type": "application/json"}, | |
| data=json.dumps({"spellId": "d7nG5HU8tVLmI1AjlOrFR", | |
| "inputs": {"input": text}}) | |
| ) | |
| result = response.json()["outputs"][0]["output"] | |
| return result | |
| if __name__ == "__main__": | |
| interface.launch() |