FAS-demo / test.py
sanjay7178's picture
Upload 10 files
0a5550b
raw
history blame
609 Bytes
import aiohttp
import json
import base64
async def spoof_trigger(b64):
url = "https://spoofapi1.azurewebsites.net/api/spoofvisualize"
payload = {"img": b64}
headers = {
'x-functions-key': 'wGw3zXXPlLCez-VrcSs9RTahE4gLC674pf7Fp6Au2kUHAzFuNnZZMw==',
'Content-Type': 'text/plain'
}
async with aiohttp.ClientSession() as session:
async with session.post(url, json=payload, headers=headers) as response:
response_text = await response.text()
spoof_res = json.loads(response_text)
return spoof_res
a = input('input:')
x = spoof_trigger(a)
print(x)