Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -45,8 +45,11 @@ def get_response(request: RequestModel):
|
|
45 |
max_length=max_output_length,
|
46 |
num_return_sequences=num_of_return_sequences
|
47 |
)
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
-
return {"generated_text": generated_texts}
|
51 |
|
52 |
# To run the FastAPI app, use the command: uvicorn <filename>:app --reload
|
|
|
45 |
max_length=max_output_length,
|
46 |
num_return_sequences=num_of_return_sequences
|
47 |
)
|
48 |
+
|
49 |
+
# Print the generated text sequences
|
50 |
+
for i, text in enumerate(generated_texts):
|
51 |
+
print(f"Generated Text {1}: {text['generated_text']}")
|
52 |
|
53 |
+
return {"generated_text": text['generated_text']}
|
|
|
54 |
|
55 |
# To run the FastAPI app, use the command: uvicorn <filename>:app --reload
|