BMukhtar commited on
Commit
5caf956
β€’
1 Parent(s): e0ef745

removed extra resources, added reference

Browse files
Files changed (2) hide show
  1. README.md +12 -2
  2. app.py +16 -16
README.md CHANGED
@@ -3,8 +3,7 @@
3
  ## Mukhtar Bimurat
4
 
5
 
6
- ## < Your App's Name >
7
-
8
 
9
  ## Typeform to submit:
10
  https://8ce4yw1bi3g.typeform.com/to/NXbENSKC
@@ -24,3 +23,14 @@ license: apache-2.0
24
  ---
25
 
26
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
3
  ## Mukhtar Bimurat
4
 
5
 
6
+ ## BMA_GPT
 
7
 
8
  ## Typeform to submit:
9
  https://8ce4yw1bi3g.typeform.com/to/NXbENSKC
 
23
  ---
24
 
25
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
26
+
27
+ Thanks for original paper authors:
28
+ ```
29
+ @article{shen2023hugginggpt,
30
+ title = {HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in HuggingFace},
31
+ author = {Shen, Yongliang and Song, Kaitao and Tan, Xu and Li, Dongsheng and Lu, Weiming and Zhuang, Yueting},
32
+ journal = {arXiv preprint arXiv:2303.17580},
33
+ year = {2023}
34
+ }
35
+ ```
36
+
app.py CHANGED
@@ -125,10 +125,8 @@ class Client:
125
  css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}"
126
  with gr.Blocks(css=css) as demo:
127
  state = gr.State(value={"client": Client()})
128
- gr.Markdown("<h1><center>HuggingGPT</center></h1>")
129
- gr.Markdown("<p align='center'><img src='https://i.ibb.co/qNH3Jym/logo.png' height='25' width='95'></p>")
130
- gr.Markdown("<p align='center' style='font-size: 20px;'>A system to connect LLMs with ML community. See our <a href='https://github.com/microsoft/JARVIS'>Project</a> and <a href='http://arxiv.org/abs/2303.17580'>Paper</a>.</p>")
131
- gr.HTML('''<center><a href="https://huggingface.co/spaces/microsoft/HuggingGPT?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key and Hugging Face Token</center>''')
132
  with gr.Row().style():
133
  with gr.Column(scale=0.85):
134
  openai_api_key = gr.Textbox(
@@ -140,16 +138,16 @@ with gr.Blocks(css=css) as demo:
140
  with gr.Column(scale=0.15, min_width=0):
141
  btn1 = gr.Button("Submit").style(full_height=True)
142
 
143
- with gr.Row().style():
144
- with gr.Column(scale=0.85):
145
- hugging_face_token = gr.Textbox(
146
- show_label=False,
147
- placeholder="Set your Hugging Face Token here and press Enter",
148
- lines=1,
149
- type="password"
150
- ).style(container=False)
151
- with gr.Column(scale=0.15, min_width=0):
152
- btn3 = gr.Button("Submit").style(full_height=True)
153
 
154
 
155
  with gr.Row().style():
@@ -183,10 +181,12 @@ with gr.Blocks(css=css) as demo:
183
 
184
  openai_api_key.submit(set_key, [state, openai_api_key], [openai_api_key])
185
  txt.submit(add_text, [state, chatbot, txt], [chatbot, txt]).then(bot, [state, chatbot], [chatbot, results])
186
- hugging_face_token.submit(set_token, [state, hugging_face_token], [hugging_face_token])
187
  btn1.click(set_key, [state, openai_api_key], [openai_api_key])
188
  btn2.click(add_text, [state, chatbot, txt], [chatbot, txt]).then(bot, [state, chatbot], [chatbot, results])
189
- btn3.click(set_token, [state, hugging_face_token], [hugging_face_token])
 
 
190
 
191
  gr.Examples(
192
  examples=["Given a collection of image A: /examples/a.jpg, B: /examples/b.jpg, C: /examples/c.jpg, please tell me how many zebras in these picture?",
 
125
  css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}"
126
  with gr.Blocks(css=css) as demo:
127
  state = gr.State(value={"client": Client()})
128
+ gr.Markdown("<h1><center>BMA_GPT</center></h1>")
129
+ gr.Markdown("<p align='center' style='font-size: 20px;'>A system to connect LLMs with hugging face models.</p>")
 
 
130
  with gr.Row().style():
131
  with gr.Column(scale=0.85):
132
  openai_api_key = gr.Textbox(
 
138
  with gr.Column(scale=0.15, min_width=0):
139
  btn1 = gr.Button("Submit").style(full_height=True)
140
 
141
+ # with gr.Row().style():
142
+ # with gr.Column(scale=0.85):
143
+ # hugging_face_token = gr.Textbox(
144
+ # show_label=False,
145
+ # placeholder="Set your Hugging Face Token here and press Enter",
146
+ # lines=1,
147
+ # type="password"
148
+ # ).style(container=False)
149
+ # with gr.Column(scale=0.15, min_width=0):
150
+ # btn3 = gr.Button("Submit").style(full_height=True)
151
 
152
 
153
  with gr.Row().style():
 
181
 
182
  openai_api_key.submit(set_key, [state, openai_api_key], [openai_api_key])
183
  txt.submit(add_text, [state, chatbot, txt], [chatbot, txt]).then(bot, [state, chatbot], [chatbot, results])
184
+ # hugging_face_token.submit(set_token, [state, hugging_face_token], [hugging_face_token])
185
  btn1.click(set_key, [state, openai_api_key], [openai_api_key])
186
  btn2.click(add_text, [state, chatbot, txt], [chatbot, txt]).then(bot, [state, chatbot], [chatbot, results])
187
+ hugging_face_token = "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"
188
+ state["client"].set_token(hugging_face_token)
189
+ # btn3.click(set_token, [state, hugging_face_token], [hugging_face_token])
190
 
191
  gr.Examples(
192
  examples=["Given a collection of image A: /examples/a.jpg, B: /examples/b.jpg, C: /examples/c.jpg, please tell me how many zebras in these picture?",