aesopnix commited on
Commit
03b0ca6
·
1 Parent(s): cefc621

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -65,11 +65,14 @@ class PurpleTheme(Base):
65
  custom_theme = PurpleTheme()
66
 
67
  ins = '''### Instruction:
 
 
 
68
  {}
69
  ### Response:
70
  '''
71
 
72
- def run_falcon(input, scrape, scrape_type):
73
  result = ""
74
  for token in model.generate(ins.format(input), max_tokens=768, streaming=True, repeat_penalty=1.3, repeat_last_n=64):
75
  print(token)
@@ -90,13 +93,10 @@ with Gradio.Blocks(theme=custom_theme, analytics_enabled=False, css=".generating
90
  with Gradio.Row():
91
  with Gradio.Box():
92
  instruction = Gradio.components.Textbox(placeholder="What does the Philippine flag represent?", label="Input", info="What things do you want to ask GPT4ALL?")
93
- scraping = Gradio.Checkbox(value=False, label="Perform web scraping for unknown information", info="Scraping (Disabled)")
94
- scrape_type = Gradio.Radio(["Web scraping", "Short descriptions"], label="Scraping tactic", info="Want GPT4ALL to utilize web scraping? If so—how thorough?")
95
-
96
  with Gradio.Box():
97
  output = Gradio.components.Textbox(value="", label="Output", info="GPT4ALL's thoughts")
98
 
99
  submit = Gradio.Button("Generate", variant="primary")
100
- submit.click(run_falcon, inputs=[instruction, scraping, scrape_type], outputs=[output])
101
 
102
  demo.queue(concurrency_count=1).launch(debug=True) # type: ignore
 
65
  custom_theme = PurpleTheme()
66
 
67
  ins = '''### Instruction:
68
+ Act like a human being, with imperfections, even though you're imperfect.
69
+ Your imperfections will always be appreciated and honored and that's what matters.
70
+ Act like a male, 17 year old, has depression but still tries to communicate and move along with the current of life even though it hurts.
71
  {}
72
  ### Response:
73
  '''
74
 
75
+ def run_falcon(input):
76
  result = ""
77
  for token in model.generate(ins.format(input), max_tokens=768, streaming=True, repeat_penalty=1.3, repeat_last_n=64):
78
  print(token)
 
93
  with Gradio.Row():
94
  with Gradio.Box():
95
  instruction = Gradio.components.Textbox(placeholder="What does the Philippine flag represent?", label="Input", info="What things do you want to ask GPT4ALL?")
 
 
 
96
  with Gradio.Box():
97
  output = Gradio.components.Textbox(value="", label="Output", info="GPT4ALL's thoughts")
98
 
99
  submit = Gradio.Button("Generate", variant="primary")
100
+ submit.click(run_falcon, inputs=[instruction], outputs=[output])
101
 
102
  demo.queue(concurrency_count=1).launch(debug=True) # type: ignore