Spaces:
Running
Running
Update space
Browse files
README.md
CHANGED
@@ -4,10 +4,10 @@ emoji: 💬
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
app_port:
|
11 |
---
|
12 |
|
13 |
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.39.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
app_port: 7860
|
11 |
---
|
12 |
|
13 |
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
app.py
CHANGED
@@ -68,7 +68,7 @@ demo = gr.ChatInterface(
|
|
68 |
title="GPT-4O-mini",
|
69 |
description="A simple proxy to OpenAI!\nYou can use this space as a proxy! click [here](https://quardo-test.hf.space/v1/models) to see the available models. [only chat endpoint is open.]",
|
70 |
additional_inputs=[
|
71 |
-
gr.Textbox(value="You are a
|
72 |
gr.Dropdown(choices=getModels(), value="gpt-4o-mini-2024-07-18", label="Model"),
|
73 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
74 |
gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.1, label="Temperature"),
|
@@ -146,8 +146,8 @@ class ArgParser(argparse.ArgumentParser):
|
|
146 |
def __init__(self, *args, **kwargs):
|
147 |
super(ArgParser, self).__init__(*args, **kwargs)
|
148 |
|
149 |
-
self.add_argument("-s", "--server", type=str, default="
|
150 |
-
self.add_argument("-p", "--port", type=int, default=
|
151 |
self.add_argument("-d", "--dev", default=False, action="store_true")
|
152 |
|
153 |
self.args = self.parse_args(sys.argv[1:])
|
|
|
68 |
title="GPT-4O-mini",
|
69 |
description="A simple proxy to OpenAI!\nYou can use this space as a proxy! click [here](https://quardo-test.hf.space/v1/models) to see the available models. [only chat endpoint is open.]",
|
70 |
additional_inputs=[
|
71 |
+
gr.Textbox(value="You are a helpful assistant.", label="System message"),
|
72 |
gr.Dropdown(choices=getModels(), value="gpt-4o-mini-2024-07-18", label="Model"),
|
73 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
74 |
gr.Slider(minimum=0.1, maximum=2.0, value=0.7, step=0.1, label="Temperature"),
|
|
|
146 |
def __init__(self, *args, **kwargs):
|
147 |
super(ArgParser, self).__init__(*args, **kwargs)
|
148 |
|
149 |
+
self.add_argument("-s", "--server", type=str, default="0.0.0.0")
|
150 |
+
self.add_argument("-p", "--port", type=int, default=7860)
|
151 |
self.add_argument("-d", "--dev", default=False, action="store_true")
|
152 |
|
153 |
self.args = self.parse_args(sys.argv[1:])
|