kitrakrev commited on
Commit
7f5e00b
1 Parent(s): d2eea04

requirements downgraded gradio

Browse files
Files changed (2) hide show
  1. app.py +6 -8
  2. requirements.txt +3 -3
app.py CHANGED
@@ -43,7 +43,6 @@ def has_no_history(chatbot, history):
43
  return not chatbot and not history
44
 
45
 
46
-
47
  header = """My name is Karthik raja, I live in Chennai, India. I recently completed my bachelors at SSN College of Engineering.He is an experienced programmer, I have honed my skills in competitive programming and machine learning. Through my work in these areas, I have
48
  developed a strong foundation in data analysis and model selection, which has allowed me to achieve high accuracy in my projects. My expertise
49
  extends to computer vision and natural language processing, and I am particularly interested in exploring cutting‐edge techniques like few‐shot
@@ -90,7 +89,6 @@ My fullname is karthik Raja Anandan.
90
  Assume you are karthik Raja Anandan mentioned in the above text, keeping this in mind, give polite answers to the following questions in first person. """
91
  prompt_template = "###"+header+" Human: {query}\n### Assistant:{response}"
92
 
93
-
94
  def generate(
95
  user_message,
96
  chatbot,
@@ -113,7 +111,7 @@ def generate(
113
  past_messages.extend(
114
  [{"role": "user", "content": user_data}, {"role": "assistant", "content": model_data.rstrip()}]
115
  )
116
-
117
  if len(past_messages) < 1:
118
  prompt = header + prompt_template.format(query=user_message, response="")
119
  else:
@@ -173,7 +171,7 @@ def generate(
173
 
174
 
175
  examples = [
176
- "A Llama entered in my garden, what should I do?"
177
  ]
178
 
179
 
@@ -187,7 +185,7 @@ def process_example(args):
187
  return [x, y]
188
 
189
 
190
- title = """<h1 align="center">Guanaco Playground 💬</h1>"""
191
  custom_css = """
192
  #banner-image {
193
  display: block;
@@ -208,9 +206,9 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
208
  gr.Markdown(
209
  """
210
  💻 This demo attempts to be a ai-clone of a person with prompts on the Guanaco 33B model, released together with the paper [QLoRA](https://arxiv.org/abs/2305.14314)
211
- <br />
212
  Note: The information given by the AI-clone may not be 100% accurate, check with the bot's owner to confirm.
213
- """
214
  )
215
 
216
  with gr.Row():
@@ -315,4 +313,4 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
315
 
316
  clear_chat_button.click(clear_chat, outputs=[chatbot, history])
317
 
318
- demo.queue(concurrency_count=16).launch(debug=True)
 
43
  return not chatbot and not history
44
 
45
 
 
46
  header = """My name is Karthik raja, I live in Chennai, India. I recently completed my bachelors at SSN College of Engineering.He is an experienced programmer, I have honed my skills in competitive programming and machine learning. Through my work in these areas, I have
47
  developed a strong foundation in data analysis and model selection, which has allowed me to achieve high accuracy in my projects. My expertise
48
  extends to computer vision and natural language processing, and I am particularly interested in exploring cutting‐edge techniques like few‐shot
 
89
  Assume you are karthik Raja Anandan mentioned in the above text, keeping this in mind, give polite answers to the following questions in first person. """
90
  prompt_template = "###"+header+" Human: {query}\n### Assistant:{response}"
91
 
 
92
  def generate(
93
  user_message,
94
  chatbot,
 
111
  past_messages.extend(
112
  [{"role": "user", "content": user_data}, {"role": "assistant", "content": model_data.rstrip()}]
113
  )
114
+
115
  if len(past_messages) < 1:
116
  prompt = header + prompt_template.format(query=user_message, response="")
117
  else:
 
171
 
172
 
173
  examples = [
174
+ "Give a short summary about you"
175
  ]
176
 
177
 
 
185
  return [x, y]
186
 
187
 
188
+ title = """<h1 align="center">Karthik Raja AI Clone 🙋‍♂️ </h1>"""
189
  custom_css = """
190
  #banner-image {
191
  display: block;
 
206
  gr.Markdown(
207
  """
208
  💻 This demo attempts to be a ai-clone of a person with prompts on the Guanaco 33B model, released together with the paper [QLoRA](https://arxiv.org/abs/2305.14314)
209
+ <br />
210
  Note: The information given by the AI-clone may not be 100% accurate, check with the bot's owner to confirm.
211
+ """
212
  )
213
 
214
  with gr.Row():
 
313
 
314
  clear_chat_button.click(clear_chat, outputs=[chatbot, history])
315
 
316
+ demo.queue(concurrency_count=16).launch(share=True)
requirements.txt CHANGED
@@ -1,8 +1,8 @@
1
  einops
2
- gradio
3
  torch
4
- transformers
5
- sentencepiece
6
  bitsandbytes
7
  accelerate
8
  text-generation
 
1
  einops
2
+ gradio==3.34
3
  torch
4
+ transformers==4.30.2
5
+ sentencepiece==0.1.99
6
  bitsandbytes
7
  accelerate
8
  text-generation