acecalisto3 commited on
Commit
8091f1f
1 Parent(s): 3b2eab9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  import os
3
  import subprocess
4
- from huggingface_hub import cached_download, hf_hub_url
5
  from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
6
  import black
7
  import pylint
@@ -18,8 +17,8 @@ def chat_interface(input_text):
18
  Returns:
19
  The chatbot's response.
20
  """
21
- # Load the appropriate language model from Hugging Face
22
- model_name = 'google/flan-t5-xl' # Choose a suitable model
23
  try:
24
  model = AutoModelForCausalLM.from_pretrained(model_name)
25
  tokenizer = AutoTokenizer.from_pretrained(model_name)
 
1
  import streamlit as st
2
  import os
3
  import subprocess
 
4
  from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
5
  import black
6
  import pylint
 
17
  Returns:
18
  The chatbot's response.
19
  """
20
+ # Load the GPT-2 model which is compatible with AutoModelForCausalLM
21
+ model_name = 'gpt2'
22
  try:
23
  model = AutoModelForCausalLM.from_pretrained(model_name)
24
  tokenizer = AutoTokenizer.from_pretrained(model_name)