ysharma HF staff commited on
Commit
4593130
1 Parent(s): 11609ab
Files changed (1) hide show
  1. app.py +2 -26
app.py CHANGED
@@ -8,30 +8,6 @@ HF_TOKEN = os.environ["HF_TOKEN"]
8
  headers = {"Authorization": f"Bearer {HF_TOKEN}"}
9
 
10
 
11
- prompt1 = """
12
- word: risk
13
- poem using word: And then the day came,
14
- when the risk
15
- to remain tight
16
- in a bud
17
- was more painful
18
- than the risk
19
- it took
20
- to blossom.
21
- word: """
22
-
23
- prompt2 = """
24
- Q: Joy has 5 balls. He buys 2 more cans of balls. Each can has 3 balls. How many balls he has now?
25
- A: Joy had 5 balls. 2 cans of 3 balls each is 6 balls. 5 + 6 = 11. Answer is 11.
26
- Q: Jane has 16 balls. Half balls are golf balls, and half golf balls are red. How many red golf balls are there?
27
- A: """
28
-
29
- prompt3 = """Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?
30
- A: Let’s think step by step.
31
- """
32
-
33
-
34
-
35
  def sql_generate(prompt, input_prompt_sql ):
36
 
37
  print(f"*****Inside SQL_generate - Prompt is :{prompt}")
@@ -72,9 +48,9 @@ def sql_generate(prompt, input_prompt_sql ):
72
  demo = gr.Blocks()
73
 
74
  with demo:
75
- gr.Markdown("<h1><center>Bloom</center></h1>")
76
  gr.Markdown(
77
- """Testing Bloom for SQL generation """
78
  )
79
  with gr.Row():
80
 
 
8
  headers = {"Authorization": f"Bearer {HF_TOKEN}"}
9
 
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  def sql_generate(prompt, input_prompt_sql ):
12
 
13
  print(f"*****Inside SQL_generate - Prompt is :{prompt}")
 
48
  demo = gr.Blocks()
49
 
50
  with demo:
51
+ gr.Markdown("<h1><center>Zero Shot SQL by Bloom</center></h1>")
52
  gr.Markdown(
53
+ """[BigScienceW Bloom](https://twitter.com/BigscienceW) \n\n Large language models have demonstrated a capability of Zero-Shot SQL generation. Some might say — You can get good results out of LLMs if you know how to speak to them. This space is an attempt at inspecting this behavior/capability in the new HuggingFace BigScienceW [Bloom](https://huggingface.co/bigscience/bloom) model. \n\nThis Space is created by [Yuvraj Sharma](https://twitter.com/yvrjsharma) for EuroPython 2022 Demo.\nThe Prompt length is limited at the API end right now, thus there is a certain limitation in testing Bloom's capability thoroughly. This Space might sometime fail due to inference queue being full and logs would end up showing error as *queue full, try again later*, don't despair and try again after few minutes. Still iterating over the app, might add new features soon."""
54
  )
55
  with gr.Row():
56