Delete files client.py with huggingface_hub
Browse files
client.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
import requests
|
| 2 |
-
|
| 3 |
-
# Send prompt to the tokenizer service
|
| 4 |
-
prompt = "Once upon a time"
|
| 5 |
-
tokenizer_response = requests.post('http://localhost:5001/tokenize', json={'prompt': prompt})
|
| 6 |
-
input_ids = tokenizer_response.json()['input_ids']
|
| 7 |
-
|
| 8 |
-
# Send tokenized input to the model service
|
| 9 |
-
model_response = requests.post('http://localhost:5002/generate', json={'input_ids': input_ids})
|
| 10 |
-
output_ids = model_response.json()['output_ids']
|
| 11 |
-
|
| 12 |
-
# Send output IDs to the decoder service
|
| 13 |
-
decoder_response = requests.post('http://localhost:5003/decode', json={'output_ids': output_ids})
|
| 14 |
-
generated_text = decoder_response.json()['generated_text']
|
| 15 |
-
|
| 16 |
-
print("Generated Text:", generated_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|