Spaces:
Running
on
Zero
Running
on
Zero
Update multipurpose_chatbot/demos/chat_interface.py
Browse files
multipurpose_chatbot/demos/chat_interface.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
from gradio.themes import ThemeClass as Theme
|
3 |
import numpy as np
|
4 |
import argparse
|
@@ -120,7 +121,8 @@ def format_conversation(history, system_prompt=None):
|
|
120 |
_str = f"<<<Syst>>> {system_prompt}\n" + _str
|
121 |
return _str
|
122 |
|
123 |
-
|
|
|
124 |
def chat_response_stream_multiturn_engine(
|
125 |
message: str,
|
126 |
history: List[Tuple[str, str]],
|
|
|
1 |
import os
|
2 |
+
import spaces
|
3 |
from gradio.themes import ThemeClass as Theme
|
4 |
import numpy as np
|
5 |
import argparse
|
|
|
121 |
_str = f"<<<Syst>>> {system_prompt}\n" + _str
|
122 |
return _str
|
123 |
|
124 |
+
|
125 |
+
@spaces.GPU
|
126 |
def chat_response_stream_multiturn_engine(
|
127 |
message: str,
|
128 |
history: List[Tuple[str, str]],
|