Spaces:
Sleeping
Sleeping
Commit
·
35b2fbd
1
Parent(s):
532bc0e
Add function return type
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ For more information on `huggingface_hub` Inference API support,
|
|
3 |
please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
4 |
"""
|
5 |
|
|
|
6 |
import gradio as gr
|
7 |
from huggingface_hub import InferenceClient
|
8 |
|
@@ -16,7 +17,7 @@ def respond(
|
|
16 |
max_tokens: int,
|
17 |
temperature: float,
|
18 |
top_p: float,
|
19 |
-
):
|
20 |
messages = [{"role": "system", "content": system_message}]
|
21 |
|
22 |
for val in history:
|
|
|
3 |
please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
4 |
"""
|
5 |
|
6 |
+
from typing import Any, Generator
|
7 |
import gradio as gr
|
8 |
from huggingface_hub import InferenceClient
|
9 |
|
|
|
17 |
max_tokens: int,
|
18 |
temperature: float,
|
19 |
top_p: float,
|
20 |
+
) -> Generator[Any, Any, None]:
|
21 |
messages = [{"role": "system", "content": system_message}]
|
22 |
|
23 |
for val in history:
|