Spaces:
Runtime error
Runtime error
Commit ·
a373b40
1
Parent(s): ef895a9
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# main.py
|
| 2 |
import streamlit as st
|
| 3 |
import transformers
|
| 4 |
import langchain
|
|
@@ -32,12 +31,8 @@ st.set_page_config(page_title="Code Generator", layout="wide", initial_sidebar_s
|
|
| 32 |
st.title("Code Generator")
|
| 33 |
|
| 34 |
st.sidebar.title("Input")
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
print("Hello, " + name + ". How are you doing today?")
|
| 38 |
-
|
| 39 |
-
greet("John")
|
| 40 |
-
''')
|
| 41 |
|
| 42 |
if st.sidebar.button("Generate Code"):
|
| 43 |
if code_input.strip() == "":
|
|
@@ -48,5 +43,4 @@ if st.sidebar.button("Generate Code"):
|
|
| 48 |
st.code(generated_code)
|
| 49 |
except Exception as e:
|
| 50 |
st.error(f"An error occurred: {str(e)}")
|
| 51 |
-
raise StopException
|
| 52 |
-
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import transformers
|
| 3 |
import langchain
|
|
|
|
| 31 |
st.title("Code Generator")
|
| 32 |
|
| 33 |
st.sidebar.title("Input")
|
| 34 |
+
st.sidebar.label("Enter your code here:")
|
| 35 |
+
code_input = st.sidebar.text_area(placeholder="Enter your code here...", aria-label="Code input", rows=10, cols=50)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
if st.sidebar.button("Generate Code"):
|
| 38 |
if code_input.strip() == "":
|
|
|
|
| 43 |
st.code(generated_code)
|
| 44 |
except Exception as e:
|
| 45 |
st.error(f"An error occurred: {str(e)}")
|
| 46 |
+
raise StopException
|
|
|