Update app.py
Browse files
app.py
CHANGED
@@ -29,26 +29,14 @@ def greet(name):
|
|
29 |
|
30 |
print(name)
|
31 |
c = response.text
|
32 |
-
llm = LLM = G4FLLM(
|
33 |
-
model=models.gpt_35_turbo_16k
|
34 |
-
|
35 |
-
)
|
36 |
|
37 |
-
res = llm(f"""
|
38 |
-
Use the following pieces of context to answer the query at the end.
|
39 |
-
If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
40 |
|
41 |
-
|
42 |
|
43 |
-
Query: ${name}
|
44 |
|
45 |
-
Helpful Answer:
|
46 |
-
system_prompt: |
|
47 |
-
Agis en tant qu'assistant juridique gabonais Répons au question en français et en citant les articles .
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
return res
|
52 |
|
53 |
with gr.Blocks() as demo:
|
54 |
chatbot = gr.Chatbot()
|
@@ -59,21 +47,9 @@ with gr.Blocks() as demo:
|
|
59 |
print(message)
|
60 |
print("ok")
|
61 |
print(chat_history)
|
62 |
-
res = llm(
|
63 |
-
Use the following pieces of context to answer the query at the end.
|
64 |
-
If you don't know the answer, just say that you don't know, don't try to make up an answer.
|
65 |
-
|
66 |
-
${c}
|
67 |
-
|
68 |
-
Query: ${name}
|
69 |
-
|
70 |
-
Helpful Answer:
|
71 |
-
system_prompt: |
|
72 |
-
Agis en tant qu'assistant juridique gabonais Répons au question en français et en citant les articles .
|
73 |
-
|
74 |
-
""")
|
75 |
bot_message = res
|
76 |
-
chat_history.append((message))
|
77 |
time.sleep(2)
|
78 |
return "", chat_history
|
79 |
|
|
|
29 |
|
30 |
print(name)
|
31 |
c = response.text
|
|
|
|
|
|
|
|
|
32 |
|
|
|
|
|
|
|
33 |
|
34 |
+
llm = LLM = G4FLLM(model=models.gpt_35_turbo_16k)
|
35 |
|
|
|
36 |
|
|
|
|
|
|
|
37 |
|
38 |
+
res = llm()
|
39 |
+
|
|
|
40 |
|
41 |
with gr.Blocks() as demo:
|
42 |
chatbot = gr.Chatbot()
|
|
|
47 |
print(message)
|
48 |
print("ok")
|
49 |
print(chat_history)
|
50 |
+
res = llm(message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
bot_message = res
|
52 |
+
chat_history.append((message,bot_message))
|
53 |
time.sleep(2)
|
54 |
return "", chat_history
|
55 |
|