Spaces:
Running
Running
File size: 631 Bytes
04762da |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import requests
# Create new answer
response = requests.post('http://localhost:5000/generate', json={
'input_text': 'Make an analysis about artificial intelligence and the future of art',
'tags': ['#Tech', '#Art']
})
first_response = response.json()
response_id = first_response['id']
# Decode response with ID
decoded = requests.get(f'http://localhost:5000/decode/{response_id}')
# Combine multiple answers
combined = requests.post('http://localhost:5000/combine', json={
'response_ids': ['id1', 'id2'],
'new_prompt': 'Combining these two topics and discussing their impact on the future'
}) |