Not-Grim-Refer commited on
Commit
e2b30b3
·
1 Parent(s): 6e1e7dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,8 +1,7 @@
1
  import os
2
  import streamlit as st
3
- import tensorflow as tf
4
- import tensorflow_hub as hub
5
- from transformers import pipeline
6
 
7
  os.system("pip freeze > requirements.txt")
8
  os.system("pip install -r requirements.txt")
@@ -11,9 +10,9 @@ os.system("pip install -r requirements.txt")
11
  def reverse_prompt_engineer(input_code):
12
  # Analyze the input code using langchain
13
  analyzed_code = input_code
14
-
15
  # Load the tokenizer and model
16
- tokenizer = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B")
17
  model = tokenizer.model
18
 
19
  # Generate a prompt using the analyzed code
 
1
  import os
2
  import streamlit as st
3
+ import transformers
4
+ from transformers import AutoModelForCausalLM
 
5
 
6
  os.system("pip freeze > requirements.txt")
7
  os.system("pip install -r requirements.txt")
 
10
  def reverse_prompt_engineer(input_code):
11
  # Analyze the input code using langchain
12
  analyzed_code = input_code
13
+
14
  # Load the tokenizer and model
15
+ tokenizer = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-neo-1.3B")
16
  model = tokenizer.model
17
 
18
  # Generate a prompt using the analyzed code