Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
# Chatbot section using Mistral API
|
| 5 |
-
MISTRAL_API_KEY = os.getenv("MISTRAL_API_KEY")
|
| 6 |
-
API_URL = "https://api.mistral.ai/v1/chat/completions"
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
def chat_with_bot(message, history):
|
| 10 |
-
try:
|
| 11 |
headers = {"Authorization": f"Bearer {MISTRAL_API_KEY}", "Content-Type": "application/json"}
|
| 12 |
payload = {
|
| 13 |
"model": "mistral-small",
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
headers = {"Authorization": f"Bearer {MISTRAL_API_KEY}", "Content-Type": "application/json"}
|
| 3 |
payload = {
|
| 4 |
"model": "mistral-small",
|