fast and efficient
Browse files
App/Chat/utils/Summarize.py
CHANGED
@@ -103,9 +103,9 @@ async def PalmTextModel(text, candidates=1):
|
|
103 |
# for candidate in result["candidates"]
|
104 |
# ]
|
105 |
# return temp
|
106 |
-
|
107 |
-
temp="hello"
|
108 |
-
print('lo ')
|
109 |
return temp
|
110 |
else:
|
111 |
print(f"Error: {response.status}\n{await response.text()}")
|
@@ -144,4 +144,4 @@ async def Summarizer(essay):
|
|
144 |
ans = await PalmTextModel(combine_prompt.format(text=main))
|
145 |
return ans
|
146 |
|
147 |
-
asyncio.run(Summarizer("This is a test of the summarizer"))
|
|
|
103 |
# for candidate in result["candidates"]
|
104 |
# ]
|
105 |
# return temp
|
106 |
+
temp = result["choices"][0]["message"]["content"]
|
107 |
+
# temp="hello"
|
108 |
+
# print('lo ')
|
109 |
return temp
|
110 |
else:
|
111 |
print(f"Error: {response.status}\n{await response.text()}")
|
|
|
144 |
ans = await PalmTextModel(combine_prompt.format(text=main))
|
145 |
return ans
|
146 |
|
147 |
+
# asyncio.run(Summarizer("This is a test of the summarizer"))
|