Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import AutoModelForCausalLM
|
3 |
import os
|
4 |
import json
|
5 |
import time
|
@@ -9,10 +9,11 @@ from threading import Lock
|
|
9 |
# Setup logging
|
10 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
|
17 |
class EnhancedChatbot:
|
18 |
def __init__(self):
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline, AutoModelForCausalLM
|
3 |
import os
|
4 |
import json
|
5 |
import time
|
|
|
9 |
# Setup logging
|
10 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
11 |
|
12 |
+
messages = [
|
13 |
+
{"role": "user", "content": "Who are you?"},
|
14 |
+
]
|
15 |
+
pipe = pipeline("text-generation", model="mistralai/Mixtral-8x7B-Instruct-v0.1")
|
16 |
+
pipe(messages)
|
17 |
|
18 |
class EnhancedChatbot:
|
19 |
def __init__(self):
|