Spaces:
Build error
Build error
Commit
·
e4de761
1
Parent(s):
eb4fba4
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,6 +43,7 @@ def get_instructor_prompt(fileobj):
|
|
| 43 |
instructor_prompt = f.read()
|
| 44 |
return instructor_prompt
|
| 45 |
|
|
|
|
| 46 |
with gr.Blocks() as demo:
|
| 47 |
#initialize tutor (with state)
|
| 48 |
study_tutor = gr.State(EchoingTutor())
|
|
@@ -96,8 +97,7 @@ with gr.Blocks() as demo:
|
|
| 96 |
file_input = gr.File(label="Load a .txt or .py file",
|
| 97 |
file_types=['.py', '.txt'], type="file",
|
| 98 |
elem_classes="short-height")
|
| 99 |
-
instructor_prompt =
|
| 100 |
-
os.environ["SECRET_PROMPT"] = instructor_prompt
|
| 101 |
gr.Textbox(value=instructor_prompt)
|
| 102 |
|
| 103 |
|
|
|
|
| 43 |
instructor_prompt = f.read()
|
| 44 |
return instructor_prompt
|
| 45 |
|
| 46 |
+
|
| 47 |
with gr.Blocks() as demo:
|
| 48 |
#initialize tutor (with state)
|
| 49 |
study_tutor = gr.State(EchoingTutor())
|
|
|
|
| 97 |
file_input = gr.File(label="Load a .txt or .py file",
|
| 98 |
file_types=['.py', '.txt'], type="file",
|
| 99 |
elem_classes="short-height")
|
| 100 |
+
instructor_prompt = file_input.name
|
|
|
|
| 101 |
gr.Textbox(value=instructor_prompt)
|
| 102 |
|
| 103 |
|