PierreBrunelle commited on
Commit
0cc84ec
1 Parent(s): 5ba7266

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -65,13 +65,6 @@ story_table['continuation_response'] = openai.chat_completions(
65
  max_tokens=50
66
  )
67
 
68
- # Function to get the current cumulative story
69
- def get_current_story():
70
- latest_entry = story_table.tail(1)
71
- if len(latest_entry) > 0:
72
- return latest_entry['cumulative_story'][0]
73
- return ""
74
-
75
  # Functions for Gradio interface
76
  def add_contribution(contributor, content):
77
  current_story = get_current_story()
@@ -144,7 +137,7 @@ with gr.Blocks(theme=gr.themes.Base()) as demo:
144
  label="Similar Parts"
145
  )
146
 
147
- submit_btn.click(add_contribution, inputs=[contributor, content], outputs=[status, current_story])
148
  search_btn.click(get_similar_parts, inputs=[search_query, num_results], outputs=[search_results])
149
  generate_btn.click(generate_next_part, outputs=[generated_part])
150
  summarize_btn.click(summarize_story, outputs=[summary])
 
65
  max_tokens=50
66
  )
67
 
 
 
 
 
 
 
 
68
  # Functions for Gradio interface
69
  def add_contribution(contributor, content):
70
  current_story = get_current_story()
 
137
  label="Similar Parts"
138
  )
139
 
140
+ submit_btn.click(add_contribution, inputs=[contributor, content])
141
  search_btn.click(get_similar_parts, inputs=[search_query, num_results], outputs=[search_results])
142
  generate_btn.click(generate_next_part, outputs=[generated_part])
143
  summarize_btn.click(summarize_story, outputs=[summary])