Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
client = InferenceClient(model="https://
|
5 |
-
headers={"Authorization":"Bearer
|
6 |
|
7 |
def inference(message, history):
|
8 |
partial_message = ""
|
9 |
-
for token in client.text_generation(message, max_new_tokens=
|
10 |
partial_message += token
|
11 |
yield partial_message
|
12 |
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
+
client = InferenceClient(model="https://085e2ffe-b85f-4b3d-a764-3ee4f8b84f93.job.console.elementai.com",
|
5 |
+
headers={"Authorization":"Bearer lBM9eFdmX943rDzDTi2YHw:oCGJZvu9JAhgolNNC8Fbb0QBp4nsUGK4FbCyqUy6lT8"})
|
6 |
|
7 |
def inference(message, history):
|
8 |
partial_message = ""
|
9 |
+
for token in client.text_generation(message, max_new_tokens=50000, stream=True):
|
10 |
partial_message += token
|
11 |
yield partial_message
|
12 |
|