Anubad Mahapatra commited on
Commit
5c86a6f
·
1 Parent(s): b991a69

Included HF URL in the Notebook File

Browse files
.gradio/certificate.pem ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
3
+ TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
4
+ cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
5
+ WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
6
+ ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
7
+ MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
8
+ h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
9
+ 0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
10
+ A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
11
+ T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH
12
+ B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC
13
+ B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv
14
+ KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0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 emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
31
+ -----END CERTIFICATE-----
Anubad_MIS769_HW9_Text_Generation.ipynb CHANGED
@@ -159,17 +159,10 @@
159
  "outputId": "d4da688e-f4d7-47d5-caad-3d1d8c255b3f"
160
  },
161
  "outputs": [
162
- {
163
- "name": "stderr",
164
- "output_type": "stream",
165
- "text": [
166
- "Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n"
167
- ]
168
- },
169
  {
170
  "data": {
171
  "application/vnd.jupyter.widget-view+json": {
172
- "model_id": "4708a4fc99304760a4eea15815e66aa6",
173
  "version_major": 2,
174
  "version_minor": 0
175
  },
@@ -214,7 +207,7 @@
214
  "name": "stderr",
215
  "output_type": "stream",
216
  "text": [
217
- "Passing `generation_config` together with generation-related arguments=({'pad_token_id', 'do_sample', 'max_new_tokens'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
218
  "Both `max_new_tokens` (=50) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
219
  ]
220
  },
@@ -227,9 +220,9 @@
227
  "Prompt: \"The future of artificial intelligence\"\n",
228
  "\n",
229
  "Generated:\n",
230
- "The future of artificial intelligence lies in the study of the fundamental structure of human behavior, and the ability to apply a new kind of cognition to the physical environment.\n",
231
  "\n",
232
- "In this chapter we discuss the relationship between human intelligence and computational intelligence and its implications for the future of artificial\n"
233
  ]
234
  }
235
  ],
@@ -275,7 +268,7 @@
275
  "name": "stderr",
276
  "output_type": "stream",
277
  "text": [
278
- "Passing `generation_config` together with generation-related arguments=({'pad_token_id', 'temperature', 'do_sample', 'max_new_tokens'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
279
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n",
280
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
281
  ]
@@ -288,7 +281,7 @@
288
  "============================================================\n",
289
  "\n",
290
  "Temperature 0.3:\n",
291
- " , the world was a place of mystery and mystery, and the mysteries of the world w...\n"
292
  ]
293
  },
294
  {
@@ -304,10 +297,12 @@
304
  "text": [
305
  "\n",
306
  "Temperature 0.7:\n",
307
- " , this game was a bit of a novelty and it was fun to play. I've had a few games ...\n",
308
  "\n",
309
  "Temperature 1.2:\n",
310
- " it was unknown how this creature began: the strange sounds coming from inside t...\n"
 
 
311
  ]
312
  }
313
  ],
@@ -347,7 +342,7 @@
347
  "name": "stderr",
348
  "output_type": "stream",
349
  "text": [
350
- "Passing `generation_config` together with generation-related arguments=({'top_p', 'pad_token_id', 'do_sample', 'top_k', 'max_new_tokens'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
351
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
352
  ]
353
  },
@@ -373,12 +368,10 @@
373
  "text": [
374
  "\n",
375
  "top_k=10:\n",
376
- " , it seems that the people who were once the strongest in the world were now con...\n",
377
  "\n",
378
  "top_k=50:\n",
379
- " , I would be writing.\n",
380
- "\n",
381
- "The first time was in 2011. It was an exhausting summer o...\n"
382
  ]
383
  },
384
  {
@@ -394,12 +387,10 @@
394
  "text": [
395
  "\n",
396
  "top_p=0.9:\n",
397
- " , there was a man, who had been married to a woman, who had, in his mind, been a...\n",
398
  "\n",
399
  "top_p=0.5:\n",
400
- " , it was the kind of thing that could be done in a matter of minutes.\n",
401
- "\n",
402
- "\"I was a ...\n"
403
  ]
404
  }
405
  ],
@@ -464,7 +455,7 @@
464
  "name": "stderr",
465
  "output_type": "stream",
466
  "text": [
467
- "Passing `generation_config` together with generation-related arguments=({'temperature', 'max_new_tokens', 'pad_token_id', 'do_sample', 'repetition_penalty'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
468
  "Both `max_new_tokens` (=80) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
469
  ]
470
  },
@@ -489,12 +480,12 @@
489
  "text": [
490
  "\n",
491
  "No penalty (repetition_penalty=1.0):\n",
492
- " it is now offering a $25,000 reward for information that leads to its arrest.\n",
493
  "\n",
494
- "According to the company's website, the ...\n",
495
  "\n",
496
  "Penalty 1.3 (repetition_penalty=1.3):\n",
497
- " it would be bringing its \"Bridgestone\" line of products to the U.S., including a new camera and other accessories, via ...\n"
498
  ]
499
  }
500
  ],
@@ -653,7 +644,7 @@
653
  "output_type": "stream",
654
  "text": [
655
  "* Running on local URL: http://127.0.0.1:7860\n",
656
- "* Running on public URL: https://c372ded4f9a9062390.gradio.live\n",
657
  "\n",
658
  "This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
659
  ]
@@ -661,7 +652,7 @@
661
  {
662
  "data": {
663
  "text/html": [
664
- "<div><iframe src=\"https://c372ded4f9a9062390.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
665
  ],
666
  "text/plain": [
667
  "<IPython.core.display.HTML object>"
@@ -873,22 +864,22 @@
873
  "name": "stdout",
874
  "output_type": "stream",
875
  "text": [
876
- "🚀 YOUR HUGGINGFACE SPACE\n",
877
  "============================================================\n",
878
- "URL: https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME\n",
879
  "\n",
880
- "⚠️ Replace with your actual Space URL before submitting!\n"
881
  ]
882
  }
883
  ],
884
  "source": [
885
  "# Record your Space URL\n",
886
- "space_url = \"https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME\"\n",
887
  "\n",
888
- "print(\"🚀 YOUR HUGGINGFACE SPACE\")\n",
889
  "print(\"=\" * 60)\n",
890
  "print(f\"URL: {space_url}\")\n",
891
- "print(\"\\n⚠️ Replace with your actual Space URL before submitting!\")"
892
  ]
893
  },
894
  {
@@ -940,7 +931,7 @@
940
  "text": [
941
  "\n",
942
  "Prompt: Write a professional email starting with: Dear hir...\n",
943
- "Output: I am looking into an appointment with a professional HR department. I would like to know if I can t...\n"
944
  ]
945
  },
946
  {
@@ -956,18 +947,10 @@
956
  "text": [
957
  "\n",
958
  "Prompt: Create a product description for: A smart water bo...\n",
959
- "Output: looks like this:\n",
960
- "\n",
961
- "The first step is to find a product description on Amazon, using some of its free...\n",
962
  "\n",
963
  "Prompt: Generate a tweet about: The benefits of remote wor...\n",
964
- "Output: \n",
965
- "\n",
966
- "How to use it\n",
967
- "\n",
968
- "Create a new URL:\n",
969
- "\n",
970
- "https://www.reddit.com/r/TheDictionary/comments/2qw7fk/the_benef...\n"
971
  ]
972
  }
973
  ],
 
159
  "outputId": "d4da688e-f4d7-47d5-caad-3d1d8c255b3f"
160
  },
161
  "outputs": [
 
 
 
 
 
 
 
162
  {
163
  "data": {
164
  "application/vnd.jupyter.widget-view+json": {
165
+ "model_id": "c5414bef6bd548adb20feb1758f59005",
166
  "version_major": 2,
167
  "version_minor": 0
168
  },
 
207
  "name": "stderr",
208
  "output_type": "stream",
209
  "text": [
210
+ "Passing `generation_config` together with generation-related arguments=({'do_sample', 'max_new_tokens', 'pad_token_id'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
211
  "Both `max_new_tokens` (=50) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
212
  ]
213
  },
 
220
  "Prompt: \"The future of artificial intelligence\"\n",
221
  "\n",
222
  "Generated:\n",
223
+ "The future of artificial intelligence: The potential for artificial intelligence to be a social force for billions of people, and it's far from certain that the technology will be the same for everyone.\n",
224
  "\n",
225
+ "In a 2014 article in the journal Nature, Stanford professor and MIT professor of computer\n"
226
  ]
227
  }
228
  ],
 
268
  "name": "stderr",
269
  "output_type": "stream",
270
  "text": [
271
+ "Passing `generation_config` together with generation-related arguments=({'do_sample', 'max_new_tokens', 'temperature', 'pad_token_id'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
272
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n",
273
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
274
  ]
 
281
  "============================================================\n",
282
  "\n",
283
  "Temperature 0.3:\n",
284
+ " , the world was a place of great beauty, and the world was a place of great fear...\n"
285
  ]
286
  },
287
  {
 
297
  "text": [
298
  "\n",
299
  "Temperature 0.7:\n",
300
+ " there were people who were all angry with the country, but he decided it was wo...\n",
301
  "\n",
302
  "Temperature 1.2:\n",
303
+ " , all was right with humankind. And one day the day would come now.\n",
304
+ "\n",
305
+ "One day it ...\n"
306
  ]
307
  }
308
  ],
 
342
  "name": "stderr",
343
  "output_type": "stream",
344
  "text": [
345
+ "Passing `generation_config` together with generation-related arguments=({'top_p', 'do_sample', 'pad_token_id', 'top_k', 'max_new_tokens'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
346
  "Both `max_new_tokens` (=30) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
347
  ]
348
  },
 
368
  "text": [
369
  "\n",
370
  "top_k=10:\n",
371
+ " , I had a friend who was a teacher in my class who had been in the military for ...\n",
372
  "\n",
373
  "top_k=50:\n",
374
+ " , I wrote that this was a book that was to be read by anyone who would listen. S...\n"
 
 
375
  ]
376
  },
377
  {
 
387
  "text": [
388
  "\n",
389
  "top_p=0.9:\n",
390
+ " , the world was a place of fear and of conflict, and a place of war and wariness...\n",
391
  "\n",
392
  "top_p=0.5:\n",
393
+ " , the most important thing to remember is that the people who have been in power...\n"
 
 
394
  ]
395
  }
396
  ],
 
455
  "name": "stderr",
456
  "output_type": "stream",
457
  "text": [
458
+ "Passing `generation_config` together with generation-related arguments=({'temperature', 'repetition_penalty', 'do_sample', 'pad_token_id', 'max_new_tokens'}) is deprecated and will be removed in future versions. Please pass either a `generation_config` object OR all generation parameters explicitly, but not both.\n",
459
  "Both `max_new_tokens` (=80) and `max_length`(=50) seem to have been set. `max_new_tokens` will take precedence. Please refer to the documentation for more information. (https://huggingface.co/docs/transformers/main/en/main_classes/text_generation)\n"
460
  ]
461
  },
 
480
  "text": [
481
  "\n",
482
  "No penalty (repetition_penalty=1.0):\n",
483
+ " it would no longer be able to sell smartphones using the same SIM card.\n",
484
  "\n",
485
+ "The new phone is one of five in its line of RI...\n",
486
  "\n",
487
  "Penalty 1.3 (repetition_penalty=1.3):\n",
488
+ " it would be releasing a new smartphone in the coming months. The device, called Sleeves 2, is expected to have six came...\n"
489
  ]
490
  }
491
  ],
 
644
  "output_type": "stream",
645
  "text": [
646
  "* Running on local URL: http://127.0.0.1:7860\n",
647
+ "* Running on public URL: https://aed497a651ba2c996b.gradio.live\n",
648
  "\n",
649
  "This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
650
  ]
 
652
  {
653
  "data": {
654
  "text/html": [
655
+ "<div><iframe src=\"https://aed497a651ba2c996b.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
656
  ],
657
  "text/plain": [
658
  "<IPython.core.display.HTML object>"
 
864
  "name": "stdout",
865
  "output_type": "stream",
866
  "text": [
867
+ "🚀 Example Text Generation\n",
868
  "============================================================\n",
869
+ "URL: https://huggingface.co/spaces/AMahapatra1/Example_Text_Generation\n",
870
  "\n",
871
+ "⚠️ My HuggingFace Space URL is shown above. Please check it out!\n"
872
  ]
873
  }
874
  ],
875
  "source": [
876
  "# Record your Space URL\n",
877
+ "space_url = \"https://huggingface.co/spaces/AMahapatra1/Example_Text_Generation\"\n",
878
  "\n",
879
+ "print(\"🚀 Example Text Generation\")\n",
880
  "print(\"=\" * 60)\n",
881
  "print(f\"URL: {space_url}\")\n",
882
+ "print(\"\\n⚠️ My HuggingFace Space URL is shown above. Please check it out!\")"
883
  ]
884
  },
885
  {
 
931
  "text": [
932
  "\n",
933
  "Prompt: Write a professional email starting with: Dear hir...\n",
934
+ "Output: I appreciate your time and support, but I have a problem with the online hiring process. As of Wedn...\n"
935
  ]
936
  },
937
  {
 
947
  "text": [
948
  "\n",
949
  "Prompt: Create a product description for: A smart water bo...\n",
950
+ "Output: can be worn, cleaned and sanitized. For example: a smart water bottle that can be worn, cleaned and...\n",
 
 
951
  "\n",
952
  "Prompt: Generate a tweet about: The benefits of remote wor...\n",
953
+ "Output: (see https://twitter.com/jamesmcgrath/status/94549675927152559), the benefits of living off the far...\n"
 
 
 
 
 
 
954
  ]
955
  }
956
  ],