Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,13 @@ from huggingface_hub import InferenceClient
|
|
4 |
client = InferenceClient(model="https://zgg3nzdpswxy4a-80.proxy.runpod.net")
|
5 |
|
6 |
def inference(message, history):
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
12 |
|
13 |
gr.ChatInterface(
|
14 |
inference,
|
|
|
4 |
client = InferenceClient(model="https://zgg3nzdpswxy4a-80.proxy.runpod.net")
|
5 |
|
6 |
def inference(message, history):
|
7 |
+
return client.text_generation(message, max_new_tokens=256, stream=False,
|
8 |
+
temperature=0.5, do_sample=True, top_p=0.9)
|
9 |
+
# partial_message = ""
|
10 |
+
# for token in client.text_generation(message, max_new_tokens=256, stream=False,
|
11 |
+
# temperature=0.5, do_sample=True, top_p=0.9):
|
12 |
+
# partial_message += token
|
13 |
+
# yield partial_message
|
14 |
|
15 |
gr.ChatInterface(
|
16 |
inference,
|