Youssouf Traore
commited on
Commit
·
2f3d17b
1
Parent(s):
c065cc6
Update app.py
Browse files
app.py
CHANGED
@@ -29,31 +29,11 @@ def infer(im):
|
|
29 |
})
|
30 |
|
31 |
|
32 |
-
|
33 |
-
return
|
34 |
|
35 |
|
36 |
-
|
37 |
-
text = "Sasuke est fort"
|
38 |
-
|
39 |
-
print(blocks)
|
40 |
-
if not text:
|
41 |
-
return "Veuillez saisir une question."
|
42 |
-
f_prompt = f""" reformule ça
|
43 |
-
{text}. """
|
44 |
-
|
45 |
-
response = openai.Completion.create(
|
46 |
-
model="text-davinci-003",
|
47 |
-
prompt=f_prompt,
|
48 |
-
temperature=0.9,
|
49 |
-
max_tokens=3500,
|
50 |
-
top_p=1)
|
51 |
-
|
52 |
-
answer = response.choices[0].text.strip()
|
53 |
-
print(answer)
|
54 |
-
return answer
|
55 |
-
|
56 |
-
iface = gr.Interface(infer,gpt,
|
57 |
title="Mariam - Beta",
|
58 |
description=" La maj du siècle. ",
|
59 |
inputs=[gr.Image(type="pil")],
|
|
|
29 |
})
|
30 |
|
31 |
|
32 |
+
|
33 |
+
return blocks
|
34 |
|
35 |
|
36 |
+
iface = gr.Interface(fn=infer,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
title="Mariam - Beta",
|
38 |
description=" La maj du siècle. ",
|
39 |
inputs=[gr.Image(type="pil")],
|