Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import InferenceClient
|
4 |
|
@@ -30,10 +29,10 @@ def respond(
|
|
30 |
|
31 |
for message in client.chat_completion(
|
32 |
messages,
|
33 |
-
max_tokens=
|
34 |
stream=True,
|
35 |
-
temperature=
|
36 |
-
top_p=
|
37 |
):
|
38 |
token = message.choices[0].delta.content
|
39 |
|
@@ -49,4 +48,5 @@ demo = gr.ChatInterface(
|
|
49 |
|
50 |
|
51 |
if __name__ == "__main__":
|
52 |
-
demo.launch()
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
|
|
29 |
|
30 |
for message in client.chat_completion(
|
31 |
messages,
|
32 |
+
max_tokens=max_tokens,
|
33 |
stream=True,
|
34 |
+
temperature=temperature,
|
35 |
+
top_p=top_p,
|
36 |
):
|
37 |
token = message.choices[0].delta.content
|
38 |
|
|
|
48 |
|
49 |
|
50 |
if __name__ == "__main__":
|
51 |
+
demo.launch()
|
52 |
+
|