NextTokenPrediction / assignment.md
Polarium
AI Text Assistant
c76198f

A newer version of the Gradio SDK is available: 6.1.0

Upgrade

AI Text Assistant Project

I need to make a small webapp which uses two models from huggingface.co. One model will be used for Text Generation and the other for Text Summarization. I need you to make a frontend which displays the results for what is generated by the models when a user enters a phrase or an article.

Text Generation Model: Qwen/Qwen2.5-0.5B-Instruct Text Summarization Model: facebook/bart-large-cnn

The app flow should look like this:

  • Application is open in the web browser (huggingface code space)
  • Choose between "Text Generation" or "Text Summarization" mode (should have single text field with toggle bar which allows to set a mode)
  • User enters their text in the input field
  • Adjust max tokens and sampling options as needed
  • Click "Process" to generate results
  • Final result of the AI is displayed for the user
  • Mouse hovering over each word the AI generates shows a box that lists the top 5 words the AI could've used instead of the final greedy result.

Have it ready to be deployed to a huggingface' spaces repo.