CogwiseAI commited on
Commit
34812cc
1 Parent(s): b63ab56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -78,19 +78,21 @@
78
  # # ).launch()
79
 
80
 
81
-
82
  from transformers import AutoModelForCausalLM, AutoTokenizer
83
  import gradio as gr
84
  import torch
85
 
86
 
87
- title = "🤖AI ChatBot"
88
- description = "A State-of-the-Art Large-scale Pretrained Response generation model (DialoGPT)"
89
  examples = [["How are you?"]]
90
 
91
 
92
  tokenizer = AutoTokenizer.from_pretrained("Cogwisechat/falcon-7b-finance")
93
- model = AutoModelForCausalLM.from_pretrained("Cogwisechat/falcon-7b-finance")
 
 
 
94
 
95
 
96
  def predict(input, history=[]):
@@ -125,4 +127,4 @@ gr.Interface(
125
  inputs=["text", "state"],
126
  outputs=["chatbot", "state"],
127
  theme="finlaymacklon/boxy_violet",
128
- ).launch()
 
78
  # # ).launch()
79
 
80
 
 
81
  from transformers import AutoModelForCausalLM, AutoTokenizer
82
  import gradio as gr
83
  import torch
84
 
85
 
86
+ title = "🦅Falcon 🗨️ChatBot"
87
+ description = "Falcon-RW-1B is a 1B parameters causal decoder-only model built by TII and trained on 350B tokens of RefinedWeb."
88
  examples = [["How are you?"]]
89
 
90
 
91
  tokenizer = AutoTokenizer.from_pretrained("Cogwisechat/falcon-7b-finance")
92
+ model = AutoModelForCausalLM.from_pretrained(
93
+ "Cogwisechat/falcon-7b-finance",
94
+ trust_remote_code=True,
95
+ )
96
 
97
 
98
  def predict(input, history=[]):
 
127
  inputs=["text", "state"],
128
  outputs=["chatbot", "state"],
129
  theme="finlaymacklon/boxy_violet",
130
+ ).launch()