Zai commited on
Commit
b87ba64
1 Parent(s): f14ba46

syncing with huggingface

Browse files
Files changed (2) hide show
  1. .github/workflows/hugging-face.yaml +1 -1
  2. space.py +45 -9
.github/workflows/hugging-face.yaml CHANGED
@@ -15,4 +15,4 @@ jobs:
15
  - name: Push to hub
16
  env:
17
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
- run: git push https://zaibutcooler:[email protected]/spaces/zaibutcooler/burmese-gpt main
 
15
  - name: Push to hub
16
  env:
17
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
+ run: git push https://zaibutcooler:[email protected]/spaces/zaibutcooler/burmese-gpt --force main
space.py CHANGED
@@ -1,16 +1,52 @@
1
  import streamlit as st
2
 
3
- def main():
4
- st.title("Burmese GPT")
 
 
 
 
5
 
6
- video_source = st.sidebar.radio("Select feature:", ("Audio Generator", "Text Predictor",))
 
 
7
 
8
- if video_source == "Audio Generator":
9
- pass
 
10
 
11
- else:
12
- pass
 
 
13
 
 
 
14
 
15
- if __name__ == "__main__":
16
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ # Set up the page layout
4
+ st.set_page_config(
5
+ page_title="Burmese GPT",
6
+ page_icon=":speech_balloon:",
7
+ layout="wide"
8
+ )
9
 
10
+ # Create a sidebar with a title and a brief description
11
+ st.sidebar.title("Burmese GPT")
12
+ st.sidebar.write("A language model app for generating and chatting in Burmese.")
13
 
14
+ # Create a selectbox to choose the view
15
+ view_options = ["Sampling", "Chat Interface"]
16
+ selected_view = st.sidebar.selectbox("Select a view:", view_options)
17
 
18
+ # Create a main area
19
+ if selected_view == "Sampling":
20
+ st.title("Sampling")
21
+ st.write("Generate text using the pre-trained model:")
22
 
23
+ # Create a text input field for the prompt
24
+ prompt = st.text_input("Prompt:", value="")
25
 
26
+ # Create a slider to choose the temperature
27
+ temperature = st.slider("Temperature:", min_value=0.0, max_value=1.0, value=0.5)
28
+
29
+ # Create a button to generate text
30
+ generate_button = st.button("Generate")
31
+
32
+ # Create an output area to display the generated text
33
+ output_area = st.text_area("Generated Text:", height=200, disabled=True)
34
+
35
+ # Add some space between the input and output areas
36
+ st.write("")
37
+
38
+ elif selected_view == "Chat Interface":
39
+ st.title("Chat Interface")
40
+ st.write("Chat with the fine-tuned model:")
41
+
42
+ # Create a text input field for the user input
43
+ user_input = st.text_input("You:", value="")
44
+
45
+ # Create a button to send the input to the model
46
+ send_button = st.button("Send")
47
+
48
+ # Create an output area to display the model's response
49
+ response_area = st.text_area("Model:", height=200, disabled=True)
50
+
51
+ # Add some space between the input and output areas
52
+ st.write("")