Spaces:
Runtime error
Runtime error
Yash Sachdeva
commited on
Commit
·
3dd4624
1
Parent(s):
a24d5ec
question
Browse files- question_paper.py +3 -5
question_paper.py
CHANGED
@@ -30,11 +30,9 @@ def llama(input):
|
|
30 |
|
31 |
# tresponse = TOKENIZER.decode(tokens[0], skip_special_tokens=False)
|
32 |
# print(tresponse)
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
text = text + ' ' + o["generated_text"]
|
37 |
-
response_message = {"message": text}
|
38 |
json_response = jsonable_encoder(response_message)
|
39 |
return JSONResponse(content=json_response)
|
40 |
|
|
|
30 |
|
31 |
# tresponse = TOKENIZER.decode(tokens[0], skip_special_tokens=False)
|
32 |
# print(tresponse)
|
33 |
+
output = generator(input, max_length=100)
|
34 |
+
|
35 |
+
response_message = {"message": output["generated_text"]}
|
|
|
|
|
36 |
json_response = jsonable_encoder(response_message)
|
37 |
return JSONResponse(content=json_response)
|
38 |
|