Spaces:
Build error
Build error
Steve Huguenin-Elie
commited on
Commit
·
e880564
1
Parent(s):
f8241e8
Compatibility with python 3.8
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
from threading import Thread
|
| 3 |
-
from typing import Iterator
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
import spaces
|
|
@@ -43,7 +43,7 @@ if torch.cuda.is_available():
|
|
| 43 |
@spaces.GPU
|
| 44 |
def generate(
|
| 45 |
message: str,
|
| 46 |
-
chat_history:
|
| 47 |
system_prompt: str,
|
| 48 |
max_new_tokens: int = 1024,
|
| 49 |
temperature: float = 0.6,
|
|
@@ -142,4 +142,4 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 142 |
gr.Markdown(LICENSE)
|
| 143 |
|
| 144 |
if __name__ == "__main__":
|
| 145 |
-
demo.queue(max_size=20).launch()
|
|
|
|
| 1 |
import os
|
| 2 |
from threading import Thread
|
| 3 |
+
from typing import Iterator, List, Tuple
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
import spaces
|
|
|
|
| 43 |
@spaces.GPU
|
| 44 |
def generate(
|
| 45 |
message: str,
|
| 46 |
+
chat_history: List[Tuple[str, str]],
|
| 47 |
system_prompt: str,
|
| 48 |
max_new_tokens: int = 1024,
|
| 49 |
temperature: float = 0.6,
|
|
|
|
| 142 |
gr.Markdown(LICENSE)
|
| 143 |
|
| 144 |
if __name__ == "__main__":
|
| 145 |
+
demo.queue(max_size=20).launch(share=True)
|