Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ from mistralai import Mistral
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
|
|
5 |
|
6 |
load_dotenv()
|
7 |
|
@@ -11,6 +12,7 @@ client = Mistral(api_key=api_key)
|
|
11 |
|
12 |
|
13 |
def echo(message, history):
|
|
|
14 |
chat_response = client.agents.complete(
|
15 |
agent_id="ag:4b4eaa5c:20250427:untitled-agent:27ff0afd",
|
16 |
messages=[
|
@@ -29,4 +31,4 @@ demo = gr.ChatInterface(
|
|
29 |
examples=["Hello, how's your day?", "I love the weather today"],
|
30 |
title="Fined Tuned LLM with Reddit Comments",
|
31 |
)
|
32 |
-
demo.launch(
|
|
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
5 |
+
import time
|
6 |
|
7 |
load_dotenv()
|
8 |
|
|
|
12 |
|
13 |
|
14 |
def echo(message, history):
|
15 |
+
time.sleep(1.1)
|
16 |
chat_response = client.agents.complete(
|
17 |
agent_id="ag:4b4eaa5c:20250427:untitled-agent:27ff0afd",
|
18 |
messages=[
|
|
|
31 |
examples=["Hello, how's your day?", "I love the weather today"],
|
32 |
title="Fined Tuned LLM with Reddit Comments",
|
33 |
)
|
34 |
+
demo.launch()
|