TechWithAnirudh commited on
Commit
21e983e
·
1 Parent(s): 72c0b30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -18
app.py CHANGED
@@ -64,23 +64,6 @@ def initialize_prompt(history):
64
  return history, history
65
 
66
 
67
- def display_prompt(show, prompt_type):
68
- if not prompt_type:
69
- show = False
70
- return "Error - prompt not selected"
71
-
72
- else:
73
- if show:
74
- prompt_file = "./prompts/" + str(prompt_type) + ".txt"
75
-
76
- with open(prompt_file, "r") as f:
77
- prompt = f.read()
78
-
79
- return prompt
80
- else:
81
- return ""
82
-
83
-
84
  with gr.Blocks() as demo:
85
  gr.Markdown("""<h3><center>ChatGPT Hacked</center></h3>""")
86
  gr.Markdown(
@@ -97,7 +80,6 @@ with gr.Blocks() as demo:
97
  login = gr.Button("Login")
98
  login.click(configure_chatgpt, inputs=[info])
99
 
100
- l = os.listdir("./prompts")
101
  li = [x.split(".")[0] for x in l]
102
 
103
  gr.Markdown("""<h4>Initialize ChatGPT</h4>""")
 
64
  return history, history
65
 
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  with gr.Blocks() as demo:
68
  gr.Markdown("""<h3><center>ChatGPT Hacked</center></h3>""")
69
  gr.Markdown(
 
80
  login = gr.Button("Login")
81
  login.click(configure_chatgpt, inputs=[info])
82
 
 
83
  li = [x.split(".")[0] for x in l]
84
 
85
  gr.Markdown("""<h4>Initialize ChatGPT</h4>""")