Update ff.py
Browse files
ff.py
CHANGED
|
@@ -99,7 +99,7 @@ def infer(im):
|
|
| 99 |
|
| 100 |
# app 2
|
| 101 |
|
| 102 |
-
def gpt(prompt):
|
| 103 |
if not prompt:
|
| 104 |
return "Veuillez saisir une question."
|
| 105 |
|
|
@@ -107,8 +107,9 @@ def gpt(prompt):
|
|
| 107 |
#answer = res(prompt)
|
| 108 |
|
| 109 |
print(prompt)
|
| 110 |
-
|
| 111 |
-
|
|
|
|
| 112 |
|
| 113 |
def gpt_francais(french_prompt,choix,autheur):
|
| 114 |
|
|
|
|
| 99 |
|
| 100 |
# app 2
|
| 101 |
|
| 102 |
+
async def gpt(prompt):
|
| 103 |
if not prompt:
|
| 104 |
return "Veuillez saisir une question."
|
| 105 |
|
|
|
|
| 107 |
#answer = res(prompt)
|
| 108 |
|
| 109 |
print(prompt)
|
| 110 |
+
response = await llm.acomplete(prompt,safety_settings=safe)
|
| 111 |
+
print(response)
|
| 112 |
+
return response
|
| 113 |
|
| 114 |
def gpt_francais(french_prompt,choix,autheur):
|
| 115 |
|