Chad commited on
Commit
dc86373
·
1 Parent(s): 1e459d3

45672uhebdwddwwd

Browse files
Files changed (1) hide show
  1. app.py +8 -24
app.py CHANGED
@@ -53,15 +53,7 @@ def toggle_language(language):
53
  "EN",
54
  "Entrez votre question ici...",
55
  "Envoyer",
56
- "Nouvelle Conversation",
57
- [
58
- "Comment la tour de Pise a-t-elle commencé à pencher ?",
59
- "Qui a construit le Colisée ?",
60
- "Quelles sont les causes de la chute de l'Empire romain ?",
61
- "Quand la Seconde Guerre mondiale a-t-elle commencé et terminé ?",
62
- "Quelle est l'importance de la Magna Carta ?",
63
- "Qui était la première personne à marcher sur la lune?"
64
- ]
65
  )
66
  else:
67
  return (
@@ -70,27 +62,19 @@ def toggle_language(language):
70
  "FR",
71
  "Enter your question here...",
72
  "Send",
73
- "New Conversation",
74
- [
75
- "How did the Leaning Tower of Pisa start leaning?",
76
- "Who built the Colosseum?",
77
- "What caused the fall of the Roman Empire?",
78
- "When did World War II begin and end?",
79
- "What was the significance of the Magna Carta?",
80
- "Who was the first person to step on the moon?"
81
- ]
82
  )
83
 
84
  with gr.Blocks() as interface:
85
  language_state = gr.State("english")
86
- example_state = gr.State([
87
  "How did the Leaning Tower of Pisa start leaning?",
88
- "Who built the Colosseum?",
89
  "What caused the fall of the Roman Empire?",
90
- "When did World War II begin and end?",
91
  "What was the significance of the Magna Carta?",
92
- "Who was the first person to step on the moon?"
93
- ])
94
 
95
  title = gr.Markdown("## History Chatbot")
96
  lang_button = gr.Button("FR")
@@ -102,7 +86,7 @@ with gr.Blocks() as interface:
102
  state = gr.State([])
103
 
104
  examples = gr.Examples(
105
- examples=example_state.value,
106
  inputs=user_input
107
  )
108
 
 
53
  "EN",
54
  "Entrez votre question ici...",
55
  "Envoyer",
56
+ "Nouvelle Conversation"
 
 
 
 
 
 
 
 
57
  )
58
  else:
59
  return (
 
62
  "FR",
63
  "Enter your question here...",
64
  "Send",
65
+ "New Conversation"
 
 
 
 
 
 
 
 
66
  )
67
 
68
  with gr.Blocks() as interface:
69
  language_state = gr.State("english")
70
+ examples = [
71
  "How did the Leaning Tower of Pisa start leaning?",
72
+ "Qui a construit le Colisée ?",
73
  "What caused the fall of the Roman Empire?",
74
+ "Quand la Seconde Guerre mondiale a-t-elle commencé et terminé ?",
75
  "What was the significance of the Magna Carta?",
76
+ "Qui était la première personne à marcher sur la lune?"
77
+ ]
78
 
79
  title = gr.Markdown("## History Chatbot")
80
  lang_button = gr.Button("FR")
 
86
  state = gr.State([])
87
 
88
  examples = gr.Examples(
89
+ examples=examples,
90
  inputs=user_input
91
  )
92